Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support copying images for specific platforms/architectures #1687

Open
ameir opened this issue Oct 14, 2022 · 2 comments
Open

Support copying images for specific platforms/architectures #1687

ameir opened this issue Oct 14, 2022 · 2 comments
Labels
kind/feature A request for, or a PR adding, new functionality

Comments

@ameir
Copy link

ameir commented Oct 14, 2022

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?

@mtrmac
Copy link
Collaborator

mtrmac commented Oct 17, 2022

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
Copy link
Collaborator

mtrmac commented Dec 9, 2022

Modifying the manifest is happening in #1707 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for, or a PR adding, new functionality
Projects
None yet
Development

No branches or pull requests

2 participants