mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-15 11:32:05 +00:00
When using combined tag@digest references (e.g., nginx:1.21@sha256:abc...), Docker does NOT store the tag in RepoTags. It only stores the digest in RepoDigests. The previous implementation required BOTH to match, which always failed because RepoTags was empty. This caused docker_container to pull the image on every run even when the image with the correct digest already existed locally, breaking idempotency. The fix: When a digest is specified, match by digest only since it's the authoritative identifier. The tag is informational for human readability. Real-world example from docker image inspect: "RepoTags": [], # Empty when pulled by digest\! "RepoDigests": ["portainer/portainer-ee@sha256:7ecf2008..."] Updated tests to reflect the correct behavior: - test_empty_repo_tags_matches_by_digest (the critical fix case) - test_combined_tag_digest_matches_even_if_tag_differs - test_multiple_tags_irrelevant_for_combined |
||
|---|---|---|
| .. | ||
| _api | ||
| _module_container | ||
| _common_api.py | ||
| _common_cli.py | ||
| _common.py | ||
| _compose_v2.py | ||
| _copy.py | ||
| _image_archive.py | ||
| _logfmt.py | ||
| _platform.py | ||
| _scramble.py | ||
| _socket_handler.py | ||
| _socket_helper.py | ||
| _swarm.py | ||
| _util.py | ||
| _version.py | ||