Skip to content

Commit

Permalink
Add note on compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jan 2, 2024
1 parent d300855 commit 14bcf93
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/modules/docker_compose_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@
author:
- Felix Fontein (@felixfontein)
notes:
- The Docker compose CLI plugin has no stable output format (see for example U(https://github.com/docker/compose/pull/10918)),
and for the main operations also no machine friendly output format. The module tries to accomodate this with various
version-dependent behavior adjustments and with testing older and newer versions of the Docker compose CLI plugin.
Currently the module is tested with multiple plugin versions between 2.18.1 and 2.23.3. The exact list of plugin versions
will change over time. New releases of the Docker compose CLI plugin can break this module at any time.
seealso:
- module: community.docker.docker_compose
'''
Expand Down Expand Up @@ -505,6 +513,7 @@ def __init__(self, client):
def get_base_args(self):
args = ['compose', '--ansi', 'never']
if self.compose_version >= LooseVersion('2.19.0'):
# https://github.com/docker/compose/pull/10690
args.extend(['--progress', 'plain'])
args.extend(['--project-directory', self.project_src])
if self.project_name:
Expand All @@ -518,6 +527,7 @@ def get_base_args(self):
def list_containers_raw(self):
args = self.get_base_args() + ['ps', '--format', 'json', '--all']
if self.compose_version >= LooseVersion('2.23.0'):
# https://github.com/docker/compose/pull/11038
args.append('--no-trunc')
kwargs = dict(cwd=self.project_src, check_rc=True)
if self.compose_version >= LooseVersion('2.21.0'):
Expand Down

0 comments on commit 14bcf93

Please sign in to comment.