Add docker compose v2 (that replace docker-compose v1)
As announced docker compose plugin v2 is GA and docker-compose is now deprecated.
See https://www.docker.com/blog/announcing-compose-v2-general-availability/
It would be convenient to include docker compose plugin v2 too. docker-compose v1 can be kept in parallel for backward compatibility
(please note that docker compose for v2 is different than docker-compose for v1)
To add docker compose plugin to docker the following commands can be used:
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
(from https://docs.docker.com/compose/install/#install-compose-on-linux-systems)
This is now supported in the latest Ubuntu based image in CodeBuild https://github.com/aws/aws-codebuild-docker-images/blob/master/ubuntu/standard/6.0/Dockerfile#L340
AL2 images will get this support in the next release.
Hi @subinataws!
Sorry it's not working as intended since docker compose is still not supported in standard:6.0, and we are still forced to use the deprecated docker-compose syntax
As indicated in my initial comment, version 2 should be used through docker compose and not docker-compose. (see the Docker blog). That's why the installation is different (see https://docs.docker.com/compose/install/compose-plugin/#install-the-plugin-manually) the binary must be installed into $HOME/.docker/cli-plugins/docker-compose or /usr/local/lib/docker/cli-plugins
Could you fix that ?
Thanks for highlighting that @xfournet. Team will get that fixed, but don't have any ETA to share. Will keep this open until that new plugin is installed to allow for the new command format.
@subinataws I think docker compose should also be upgraded to at least 2.13.0. I have opened the below issue for this
https://github.com/aws/aws-codebuild-docker-images/issues/588
Docker are no longer supporting docker-compose from June 2023, so this needs resolving or it's going to be a problem for any build job using docker compose.
Reference: https://docs.docker.com/compose/
Important
From the end of June 2023 Compose V1 won’t be supported anymore and will be removed from all Docker Desktop versions.
Make sure you switch to Compose V2 with the docker compose CLI plugin or by activating the Use Docker Compose V2 setting in Docker Desktop. For more information, see the Evolution of Compose
Is there any update on this ? docker-compose is soon to be deprecated. We really need both ubuntu & AL2 images updated with the docker compose plugin.
Docker compose v2 is installed to the docker-compose executable https://github.com/aws/aws-codebuild-docker-images/blob/master/ubuntu/standard/6.0/Dockerfile#L340. We will update the latest images to install docker compose as a plugin in addition to the current install and thus enable docker compose with our next release. This will include a new major version for al2 and is expected to be around the middle of May.
Docker compose plugin is supported in ubuntu 7.0 and al2 5.0 #639
Thanks @Dylan-AWS . Would be possible to have it also in al2/aarch64/standard/3.0 ?
+1 👆