As of this post the Docker docs have not been fully updated and may lead you down a very headachy path of trying to get the latest stable version of docker-compose.
If you are having trouble with getting the "official" version of docker-compose (v 1.2x) to work with recent images there is solution.
Buried deep in the Docker docs is one sentence that says something to the effect of "don't bother installing it via snap or apt because those versions are old, use Docker Desktop instead."
If you do this, you will eventually run into a statement to the effect of "if you are on Linux you are SOL and just have to install docker-compose the old fashioned way."
These two statements are mutually exclusive. And only one of them is correct. Luckily, it is the former. If you install Docker Desktop then you do NOT need to install docker-compose AT ALL. The current iteration of Docker Desktop comes with version 2 of docker-compose. The syntax is one character different. Simply replace the hyphen with a space and you are good to go with the latest version of docker compose and you can use the latest yaml spec.
Version 1.2x
Docker Desktop
___
If you are using XAMPP or similar it is worth learning to use Docker. It's easier to use and less resource intensive than the ancient bronze age way of installing mysql and apache on your system.
You can start with the official tutorial https://docs.docker.com/get-started/
It has a few minor glitches but it's pretty good overall. It's out of date in relation to docker-compose. But just change the syntax as I stated above and you will be fine.
If you are having trouble with getting the "official" version of docker-compose (v 1.2x) to work with recent images there is solution.
Buried deep in the Docker docs is one sentence that says something to the effect of "don't bother installing it via snap or apt because those versions are old, use Docker Desktop instead."
If you do this, you will eventually run into a statement to the effect of "if you are on Linux you are SOL and just have to install docker-compose the old fashioned way."
These two statements are mutually exclusive. And only one of them is correct. Luckily, it is the former. If you install Docker Desktop then you do NOT need to install docker-compose AT ALL. The current iteration of Docker Desktop comes with version 2 of docker-compose. The syntax is one character different. Simply replace the hyphen with a space and you are good to go with the latest version of docker compose and you can use the latest yaml spec.
Version 1.2x
Code:
docker-compose up -d
Code:
docker compose up -d
___
If you are using XAMPP or similar it is worth learning to use Docker. It's easier to use and less resource intensive than the ancient bronze age way of installing mysql and apache on your system.
You can start with the official tutorial https://docs.docker.com/get-started/
It has a few minor glitches but it's pretty good overall. It's out of date in relation to docker-compose. But just change the syntax as I stated above and you will be fine.
Comment