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 2486cd5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/modules/docker_compose_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@
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 +514,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 +528,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 2486cd5

Please sign in to comment.