Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xfournet opened this issue May 16, 2022 · 11 comments
Closed

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

xfournet opened this issue May 16, 2022 · 11 comments

Comments

@xfournet
Copy link

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)

@subinataws
Copy link
Contributor

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
Copy link
Contributor

AL2 images will get this support in the next release.

@xfournet
Copy link
Author

xfournet commented Jul 5, 2022

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 ?

@subinataws subinataws reopened this Jul 8, 2022
@subinataws
Copy link
Contributor

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.

@debraj-manna
Copy link

debraj-manna commented Dec 21, 2022

@subinataws I think docker compose should also be upgraded to at least 2.13.0. I have opened the below issue for this

#588

@craigjbass
Copy link

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

@Lehaa
Copy link

Lehaa commented Mar 29, 2023

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.

@Dylan-AWS
Copy link
Contributor

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
Copy link
Contributor

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

@xfournet
Copy link
Author

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

@aws aws deleted a comment from craigjbass May 23, 2023
@krisgerhard
Copy link

+1 👆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants