image icon indicating copy to clipboard operation
image copied to clipboard

[Clarification] copy.CopySpecifcImages and Instances list

Open tumberino opened this issue 2 years ago • 2 comments

Hi,

Not sure if this is a bug or the intended behaviour so asking for clarification. When using the CopySpecifcImages it will copy the images listed in the Instances field but then try to put the entire manifest list into the destination which will only have the updated details for those copied as part of the Instances.

This will result in seeing manifest blob unknown: blob unknown to registry error, because there will be blobs referenced in the manifest that have not been included in the copy because they are not in the Instances list.

The language in the documentation for CopySpecifcImages does have the line "along with the list itself". Is this useful behaviour?

The usecase for this is to be able to copy only specific architectures from a multi-arch manifest rather than copying across all which can be costly storage. 1-2 GB wasted from unrequired archs.

tumberino avatar Sep 22 '22 14:09 tumberino

Thanks for reaching out.

This is the intended, or at least as-of-this-point-frozen, behavior; e.g. https://github.com/containers/image/pull/1483#pullrequestreview-900448647 points at a specific constraint.

The alternate, of copying only a subset, and modifying the manifest list (at the price of breaking digest references to the manifest list), is a reasonable feature to perhaps add in the future. (And nowadays we have some ways to make the compatibility constraints mentioned in #1483 less constraining, e.g. c/image/internal/private.)

mtrmac avatar Sep 22 '22 16:09 mtrmac

#1707 will allow modifying the manifest list.

mtrmac avatar Dec 09 '22 03:12 mtrmac

The RFE to copy only some architectures, and to update manifests, is also tracked in #1687; please follow the progress there.

mtrmac avatar Jun 28 '24 18:06 mtrmac