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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not quite precise. It’s accessing an image from a multi-image archive that requires providing a disambiguating name; the code will happily enough add (untagged/unnamed) images to an archive, as the motivating bug report demonstrates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtrmac would you prefer an additional sentence and/or an example in the docs for clarifying the github issue case? Something like
pulling multiple images without specification of reference will not preserve all references
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not quite sure what that means. (It’s a general principle of
skopeo copy
that names used in the source reference don’t affect names in the destination reference; it’s not something specific to this transport. So, copies byskopeo copy
never “preserve” names/references in that sense — OTOH Podman does have various heuristics of that kind.)The general kinds information we probably want to convey for the two transports:
org.opencontainers.image.ref.name
annotation.)oci:
oroci-archive:
, if path contains multiple images, a reference must be specified to disambiguate; otherwise, the only image is implied.oci:
don’t overwrite pre-existing images, whether or not reference is provided (but every reference will only point to one image).oci-archive:
overwrite the whole archive; only one image, the last written one, is included. (Do we want to guarantee that? Probably, ambiguity doesn’t help anyone, but I’m not 100% sure.)(Warning: I didn’t actually test any of this right now, just reading the code.)