Docker Compose V1 stopped receiving updated since July 2023. The recommended Compose is the V2, included in all docker releases.
Before you should run "docker-compose ". Now, the way to ruin Compose commands is "docker compose ". The good news is v1 and v2 are compatible at options level, so to swtich from v1 to v2 the only change to do is using "docker compose" instead of "docker-compose".
Solution
Add a new variable in the .env file named DOCKER_COMPOSE. Set it to "docker compose". In the Makefile files use the variable $DOCKER_COMPOSE instead of the command "docker-compose". This way, by default, we'll use docker compose (v2). To use v1 edit the .env and set DOCKER_COMPOSE variable to "docker-compose".
Docker Compose V1 stopped receiving updated since July 2023. The recommended Compose is the V2, included in all docker releases.
Before you should run "docker-compose". Now, the way to ruin Compose commands is "docker compose ". The good news is v1 and v2 are compatible at options level, so to swtich from v1 to v2 the only change to do is using "docker compose" instead of "docker-compose".
Solution
Add a new variable in the
.env
file named DOCKER_COMPOSE. Set it to "docker compose". In the Makefile files use the variable $DOCKER_COMPOSE instead of the command "docker-compose". This way, by default, we'll use docker compose (v2). To use v1 edit the.env
and set DOCKER_COMPOSE variable to "docker-compose".