From 959d81749fbaba0e5f24de45787aa4746cd4b70c Mon Sep 17 00:00:00 2001 From: Aditya R Date: Tue, 1 Aug 2023 00:44:37 +0530 Subject: [PATCH] libimage/ManifestPushOptions: add AddCompression from #1585 Podman uses different API for pushing manifest list, add `AddCompression` to ManifestPushOptions, which is implemented here: https://github.com/containers/common/pull/1585 [NO NEW TESTS NEEDED] Tests are added here: https://github.com/containers/common/pull/1585 Signed-off-by: Aditya R --- libimage/manifest_list.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libimage/manifest_list.go b/libimage/manifest_list.go index 0223fb355..91a91a2b0 100644 --- a/libimage/manifest_list.go +++ b/libimage/manifest_list.go @@ -415,6 +415,8 @@ type ManifestListPushOptions struct { ImageListSelection imageCopy.ImageListSelection // Use when selecting only specific imags. Instances []digest.Digest + // add existing instances with requested compression algorithms to manifest list + AddCompression []string } // Push pushes a manifest to the specified destination. @@ -446,6 +448,7 @@ func (m *ManifestList) Push(ctx context.Context, destination string, options *Ma defer copier.close() pushOptions := manifests.PushOptions{ + AddCompression: options.AddCompression, Store: m.image.runtime.store, SystemContext: copier.systemContext, ImageListSelection: options.ImageListSelection,