RUN-4630: copy: add platform-based filtering via --multi-arch flag#2874
Conversation
mtrmac
left a comment
There was a problem hiding this comment.
Thanks!
A quick first pass. Will SparseManifestListAction be a separate PR?
There’s a question whether skopeo sync should also get this feature. I don’t think that should block this PR, and pointing users towards oc-mirror as an alternative with much more features might actually be better for everyone.
|
Also non-blocking: an integration test, maybe copying from |
The suggestion above is implemented on fb229f08. |
Yes, I will open a separate PR for
If there are advantages of doing that also in the sync command, I'm more than happy to implement it. What is your opinion about having it also in the |
I think keeping it |
mtrmac
left a comment
There was a problem hiding this comment.
Thanks! LGTM, please squash the commits.
Extends the --multi-arch flag to accept platform specifications, allowing users to copy specific platforms from multi-architecture images without requiring digest hashes. Users can now specify platforms using OS/Architecture pairs: skopeo copy --multi-arch=linux/amd64,linux/arm64 docker://src docker://dst This feature: - Parses comma-separated platform specifications (e.g., linux/amd64,linux/arm64) - Copies ALL instances matching each specified platform (including all compression variants and other variations) - Works alongside existing --multi-arch options (system, all, index-only) - Leverages the InstancePlatforms field added in containers/image The implementation follows the design from containers/image#1938 and podman-container-tools/container-libs#656, providing a more user-friendly alternative to specifying digest hashes via the Instances field. Signed-off-by: Alex Guidi <aguidi@redhat.com>
c1fd287 to
7a6acb1
Compare
|
@mtrmac commits squashed. Is there anything else to do in this PR before merging? |
|
That‘s it, thanks! |
Description
Extends the
--multi-archflag to accept platform specifications, allowing users to copy specific platforms from multi-architecture images without requiring digest hashes.Changes
parseMultiArch()to parse comma-separated platform lists (e.g.,linux/amd64,linux/arm64)Usage
Implementation Details
InstancePlatformsfield from containers/image--multi-archoptionsTesting
Related