aws-codebuild-docker-images icon indicating copy to clipboard operation
aws-codebuild-docker-images copied to clipboard

Add docker compose v2 (that replace docker-compose v1)

Open xfournet opened this issue 3 years ago • 4 comments

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)

xfournet avatar May 16 '22 13:05 xfournet

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

subinataws avatar Jul 01 '22 21:07 subinataws

AL2 images will get this support in the next release.

subinataws avatar Jul 01 '22 21:07 subinataws

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 ?

xfournet avatar Jul 05 '22 10:07 xfournet

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 avatar Jul 08 '22 01:07 subinataws

@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

debraj-manna avatar Dec 21 '22 12:12 debraj-manna

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

craigjbass avatar Feb 15 '23 08:02 craigjbass

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.

Lehaa avatar Mar 29 '23 10:03 Lehaa

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.

Dylan-AWS avatar Apr 24 '23 23:04 Dylan-AWS

Docker compose plugin is supported in ubuntu 7.0 and al2 5.0 #639

Dylan-AWS avatar May 23 '23 02:05 Dylan-AWS

Thanks @Dylan-AWS . Would be possible to have it also in al2/aarch64/standard/3.0 ?

xfournet avatar May 23 '23 15:05 xfournet

+1 👆

krisgerhard avatar May 29 '23 07:05 krisgerhard