Repository navigation
fix: support pinned image where possible - #554
Merged
Merged
Conversation
Signed-off-by: awphi <adam.hodson@arm.com>
Signed-off-by: awphi <adam.hodson@arm.com>
Signed-off-by: awphi <adam.hodson@arm.com>
yejseo01
reviewed
Oct 20, 2026
Signed-off-by: awphi <adam.hodson@arm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Problem 1 - Digest preserving re-tagging
Pinning images to specific digests atm doesn't work with Topo e.g.
This is because after pulling the image on both the Host and then the Target, we attempt to re-tag it to either push to our local registry or allow compose to resolve the image without its repo identifier:
<image>aslocalhost:12737/<image>-> push to registrylocalhost:12737/<image>as<image>-> compose upHowever, tags cannot contain digests - so we error out. This is fixed by this PR where feasible*
Problem 2 - multi-image indices
Image digests can point to one of two things:
busybox:1.37.0@sha256:f10e809bcf667d8e9f01d2baf82869049a495cd448cdfe1f4dee94078b960ae9busybox:1.37.0@sha256:9db7b59979c38555a39def84a31fb98b5296952f9e3afd4f6f11f05b07adfab0The former case is covered by problem 1. The latter case is more complex as this indices are an index of other images that the container engine will pick between based on your target platform. This means the digest your compose pins to, is not the digest of the image that actually runs. For normal docker/podman workflows this is fine but falls apart for our registry-based flow. Here's a docker example:
The situation is (approximately) the same for podman but without the warning of what exactly it did, so unless you pay careful attention to the digests it spits out, the issue is hard to see.
This issue is addressed by this this PR in so far as helping you see what broke and how to fix it but does not add support for pinning to these indices as all the solutions I could come up with introduced yet more stuff to consider:
PUTing the index into the registry. The hard bit here is obtaining the orignal index byte-for-byte - if we source it from the upstream then we need authentication/proxy/mirror support again and sourcing it from the local cache requires adocker savefor docker and fragile internal storage access in podman.and most of these would effectively requiring upgrading our Host-side registry to
v3+ to support sparse indices so we don't pull an every platform's image when pinning to a multi-image index.Changes
pushinto the registry is the same as the one wepulled into the local image store on the Host and bail out if it changed to catch the multi-image index error case. Gives users something actionable to resolve this.Checklist