Skip to content

Commit

Permalink
Deprecate Docker Compose v1.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Apr 7, 2024
1 parent 71d43de commit 1f0cfb9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you use the Ansible package and do not update collections independently, use
- community.docker.docker_volume: manage Docker volumes
- community.docker.docker_volume_info: retrieve information on Docker volumes
* Docker Compose:
- community.docker.docker_compose: manage Docker Compose files (legacy Docker Compose v1)
- community.docker.docker_compose: manage Docker Compose files (legacy Docker Compose v1; the module is deprecated and will be removed from community.docker 4.0.0)
- community.docker.docker_compose_v2: manage Docker Compose files (Docker compose CLI plugin)
- community.docker.docker_compose_v2_pull: pull a Docker compose project
* Docker Swarm:
Expand Down
4 changes: 4 additions & 0 deletions changelogs/fragments/deprecate-compose-v1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
deprecated_features:
- "docker_compose - the Docker Compose v1 module is deprecated and will be removed from community.docker 4.0.0.
Please migrate to the ``community.docker.docker_compose_v2`` module, which works with Docker Compose v2
(https://github.com/ansible-collections/community.docker/issues/823, https://github.com/ansible-collections/community.docker/pull/833)."
7 changes: 4 additions & 3 deletions docs/docsite/rst/scenario_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,13 @@ No further requirements next to to the CLI tool and its Docker Compose plugin ar
Docker Compose v1
.................

The :ansplugin:`community.docker.docker_compose module <community.docker.docker_compose#module>`
The deprecated :ansplugin:`community.docker.docker_compose module <community.docker.docker_compose#module>`
allows you to use your existing Docker compose files to orchestrate containers on a single Docker daemon or on Swarm.
This module uses the out-dated and End of Life version 1.x of Docker Compose. It should mainly be used for legacy systems
which still have to use that version of Docker Compose.
which still have to use that version of Docker Compose. **The module is deprecated and will be removed from community.docker 4.0.0.**
Please use the Docker Compose v2 modules instead.

You need to install the `old Python docker-compose <https://pypi.org/project/docker-compose/>`_ on the remote machines to use the module.
You need to install the `old Python docker-compose <https://pypi.org/project/docker-compose/>`_ on the remote machines to use the Docker Compose v1 module.


Docker Machine
Expand Down
7 changes: 7 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ action_groups:
- docker_swarm_service_info
- docker_volume
- docker_volume_info

plugin_routing:
modules:
docker_compose:
deprecation:
removal_version: 4.0.0
warning_text: This module uses docker-compose v1, which is End of Life since July 2022. Please migrate to community.docker.docker_compose_v2.
5 changes: 5 additions & 0 deletions plugins/modules/docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
short_description: Manage multi-container Docker applications with Docker Compose V1
deprecated:
removed_in: 4.0.0
why: This module uses docker-compose v1, which is End of Life since July 2022.
alternative: Migrate to M(community.docker.docker_compose_v2)
author: "Chris Houseknecht (@chouseknecht)"
description:
Expand Down

0 comments on commit 1f0cfb9

Please sign in to comment.