mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-16 20:08:41 +00:00
(cherry picked from commit 9cd46a7d41)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
6d99d16a85
commit
febdace4ee
2
changelogs/fragments/292-docker-podman-compatibility.yml
Normal file
2
changelogs/fragments/292-docker-podman-compatibility.yml
Normal file
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- "docker_container, docker_image - adjust image finding code to pecularities of ``podman-docker``'s API emulation when Docker short names like ``redis`` are used (https://github.com/ansible-collections/community.docker/issues/292)."
|
||||
@ -526,11 +526,18 @@ class AnsibleDockerClientBase(Client):
|
||||
self.log("Check for docker.io image: %s" % lookup)
|
||||
images = self._image_lookup(lookup, tag)
|
||||
if not images:
|
||||
# Last case: if docker.io wasn't there, it can be that
|
||||
# the image wasn't found either (#15586)
|
||||
# Last case for some Docker versions: if docker.io wasn't there,
|
||||
# it can be that the image wasn't found either
|
||||
# (https://github.com/ansible/ansible/pull/15586)
|
||||
lookup = "%s/%s" % (registry, repo_name)
|
||||
self.log("Check for docker.io image: %s" % lookup)
|
||||
images = self._image_lookup(lookup, tag)
|
||||
if not images and '/' not in repo_name:
|
||||
# This seems to be happening with podman-docker
|
||||
# (https://github.com/ansible-collections/community.docker/issues/291)
|
||||
lookup = "%s/library/%s" % (registry, repo_name)
|
||||
self.log("Check for docker.io image: %s" % lookup)
|
||||
images = self._image_lookup(lookup, tag)
|
||||
|
||||
if len(images) > 1:
|
||||
self.fail("Registry returned more than one result for %s:%s" % (name, tag))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user