docker_image(_push): fix push detection (#1199) (#1200)

* Fix IP address retrieval for registry setup.

* Adjust push detection to Docker 29.

* Idempotency for export no longer works.

* Disable pull idempotency checks that play with architecture.

* Add more known image IDs.

* Adjust load tests.

* Adjust error message check.

* Allow for more digests.

* Make sure a new enough cryptography version is installed.

(cherry picked from commit d207643e0c)
This commit is contained in:
Felix Fontein
2025-11-16 10:36:44 +01:00
committed by GitHub
parent a80e6bf7ec
commit 5cea1cdc6d
16 changed files with 125 additions and 37 deletions
+3 -1
View File
@@ -22,6 +22,8 @@ description:
notes:
- Building images is done using Docker daemon's API. It is not possible to use BuildKit / buildx this way. Use M(community.docker.docker_image_build)
to build images with BuildKit.
- Exporting images is generally not idempotent. It depends on whether the image ID equals the IDs found in the generated tarball's C(manifest.json).
This was the case with the default storage backend up to Docker 28, but seems to have changed in Docker 29.
extends_documentation_fragment:
- community.docker.docker.api_documentation
- community.docker.attributes
@@ -735,7 +737,7 @@ class ImageManager(DockerBaseClass):
if line.get('errorDetail'):
raise Exception(line['errorDetail']['message'])
status = line.get('status')
if status == 'Pushing':
if status in ("Pushing", "Pushed"):
changed = True
self.results['changed'] = changed
except Exception as exc: