mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-04-12 12:35:53 +00:00
Work around ubg in docker compose images --format json.
This commit is contained in:
parent
72d827a9e2
commit
e5c3e01838
3
changelogs/fragments/1083-docker_compose_v2-images.yml
Normal file
3
changelogs/fragments/1083-docker_compose_v2-images.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
bugfixes:
|
||||||
|
- "docker_compose_v2 - handle a (potentially unintentional) breaking change in Docker Compose 2.37.0
|
||||||
|
(https://github.com/ansible-collections/community.docker/issues/1082, https://github.com/ansible-collections/community.docker/pull/1083)."
|
||||||
@ -818,6 +818,11 @@ class BaseComposeManager(DockerBaseClass):
|
|||||||
rc, images, stderr = self.client.call_cli_json(*args, **kwargs)
|
rc, images, stderr = self.client.call_cli_json(*args, **kwargs)
|
||||||
if self.use_json_events and rc != 0:
|
if self.use_json_events and rc != 0:
|
||||||
self._handle_failed_cli_call(args, rc, images, stderr)
|
self._handle_failed_cli_call(args, rc, images, stderr)
|
||||||
|
if isinstance(images, dict):
|
||||||
|
# Handle breaking change in Docker Compose 2.37.0; see
|
||||||
|
# https://github.com/ansible-collections/community.docker/issues/1082
|
||||||
|
# and https://github.com/docker/compose/issues/12916 for details
|
||||||
|
images = list(images.values())
|
||||||
return images
|
return images
|
||||||
|
|
||||||
def parse_events(self, stderr, dry_run=False, nonzero_rc=False):
|
def parse_events(self, stderr, dry_run=False, nonzero_rc=False):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user