You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an option to allow copying image indexes alone
The new --multi-arch option allows the user to select between copying the
image associated with the system platform, all images in the index, or
just the index itself without attempting to copy the images.
Signed-off-by: James Hewitt <[email protected]>
// There is no CopyNoImages value in copy.ImageListSelection, but because we
96
+
// don't provide an option to select a set of images to copy, we can use
97
+
// CopySpecificImages.
98
+
case"index-only":
99
+
returncopy.CopySpecificImages, nil
100
+
// We don't expose CopySpecificImages other than index-only above, because
101
+
// we currently don't provide an option to choose the images to copy. That
102
+
// could be added in the future.
103
+
default:
104
+
returncopy.CopySystemImage, fmt.Errorf("unknown multi-arch option %q. Choose one of the supported options: 'system', 'all', or 'index-only'", multiArch)
Copy file name to clipboardExpand all lines: docs/skopeo-copy.1.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,17 @@ MANIFEST TYPE (oci, v2s1, or v2s2) to use in the destination (default is manifes
66
66
67
67
Print usage statement
68
68
69
+
**--multi-arch**
70
+
71
+
Control what is copied if _source-image_ refers to a multi-architecture image. Default is system.
72
+
73
+
Options:
74
+
- system: Copy only the image that matches the system architecture
75
+
- all: Copy the full multi-architecture image
76
+
- index-only: Copy only the index
77
+
78
+
The index-only option usually fails unless the referenced per-architecture images are already present in the destination, or the target registry supports sparse indexes.
assertSkopeoFails(c, `.*destination transport .* does not support copying multiple images as a group.*`, "copy", "--all", knownListImage, "containers-storage:"+storage+"test")
199
+
assertSkopeoFails(c, `.*destination transport .* does not support copying multiple images as a group.*`, "copy", "--multi-arch=all", knownListImage, "containers-storage:"+storage+"test")
0 commit comments