image icon indicating copy to clipboard operation
image copied to clipboard

Support copying images for specific platforms/architectures

Open ameir opened this issue 3 years ago • 2 comments

Unless I've missed something, we can currently only copy the image in the manifest list that matches the current system platform, or we can copy them all. For some images, there are many other images for other platforms that I have no need for (e.g. https://hub.docker.com/_/redis/tags supports seven platforms).

Is there a way to filter the images so that I only copy amd64 and arm64 images? And if so, will the manifest list reflect just those images, or will the manifest list be copied as-is?

ameir avatar Oct 14 '22 21:10 ameir

Thanks for reaching out.

Right now, there is copy.CopySpecificImages, but that requires the caller to manually determine which images to copy.

And overall, the ImageListSelection affects which per-platform instances are copied, but the whole manifest list is used, possibly referring to missing per-platform instances. Some registries reject that.


It would make sense to provide both of those features

  • to let the caller provide some kind of platform filter, without having to individually worry about instances manually. We need to worry about all three fields determining the platform: OS/architecture/variant, and possibly more fields that will be added.
  • to allow modifying the manifest to refer only to the copied per-platform instances, instead of writing a sparse manifest. That would require building rather more of the manifest editing infrastructure (or moving Podman’s implementation).

mtrmac avatar Oct 17 '22 17:10 mtrmac

Modifying the manifest is happening in #1707 .

mtrmac avatar Dec 09 '22 03:12 mtrmac