From 5c2d17e1c1c64b7e3ed1f9c82bf894cacf886d7c Mon Sep 17 00:00:00 2001 From: Aditya Rajan Date: Mon, 1 Nov 2021 17:15:55 +0530 Subject: [backport] tag: Support tagging manifest list instead of resolving to images Following commit makes sure when buildah tag is invoked on a manifest list, it tags the same manifest list instead of resolving to an image and tagging it. Backporting https://github.com/containers/podman/pull/12057 Signed-off-by: Aditya Rajan --- pkg/domain/infra/abi/images.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index aac9a2507..df41f4f7e 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -321,7 +321,9 @@ func (ir *ImageEngine) Push(ctx context.Context, source string, destination stri } func (ir *ImageEngine) Tag(ctx context.Context, nameOrID string, tags []string, options entities.ImageTagOptions) error { - image, _, err := ir.Libpod.LibimageRuntime().LookupImage(nameOrID, nil) + // Allow tagging manifest list instead of resolving instances from manifest + lookupOptions := &libimage.LookupImageOptions{ManifestList: true} + image, _, err := ir.Libpod.LibimageRuntime().LookupImage(nameOrID, lookupOptions) if err != nil { return err } -- cgit v1.2.3-54-g00ecf