ansible-role-docker-ce icon indicating copy to clipboard operation
ansible-role-docker-ce copied to clipboard

Investigate impact of Docker Compose V2

Open haxorof opened this issue 3 years ago • 1 comments

Since end of September 2021 Docker Compose V2 (https://github.com/docker/compose/releases) was released and is a complete rewrite and base itself on an more open specification (https://compose-spec.io/).

This role handle installation of both python and the binary version of Docker Compose so it needs some review now since there is incompatibilities which may cause user issues if variable docker_compose_no_pip_version is just bumped to 2.0.0 and above. However, latest binary version of the Docker Compose will be installed as long as docker_compose_no_pip_detect_version is true and docker_compose_no_pip is set to true

Need some deeper investigation and testing here and also there has been done things to ease the migration to some part with compose-switch (https://github.com/docker/compose-switch)

References:

  • https://docs.docker.com/compose/cli-command/
  • https://compose-spec.io/
  • https://github.com/docker/compose/releases
  • https://github.com/docker/compose-switch

haxorof avatar Jan 30 '22 07:01 haxorof

Example of installation:

cd /usr/libexec/docker/cli-plugins/
wget -O docker-compose https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64
chmod +x docker-compose

After this point it will be possible to see compose part of docker cli. So to use "docker-compose" from this point is then docker compose ....

haxorof avatar Jan 30 '22 07:01 haxorof

Notice from Docker:

From the end of June 2023 Compose V1 won’t be supported anymore and will be removed from all Docker Desktop versions.

haxorof avatar May 07 '23 18:05 haxorof

By default docker-compose-plugin is installed but to ensure it is updated the role needs to be updated. This removes the need of having the tasks for download from github which is can reduce some complexity in the role. 😄

haxorof avatar May 07 '23 18:05 haxorof