From af6096889d1134b264f4bd21b0f93a982ad11147 Mon Sep 17 00:00:00 2001 From: flouthoc Date: Fri, 27 Aug 2021 13:01:51 +0530 Subject: [PATCH] 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 image and tagiing it. [NO TESTS NEEDED] Signed-off-by: flouthoc --- cmd/buildah/tag.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/buildah/tag.go b/cmd/buildah/tag.go index 382894fb497..3988a142d4d 100644 --- a/cmd/buildah/tag.go +++ b/cmd/buildah/tag.go @@ -35,7 +35,9 @@ func tagCmd(c *cobra.Command, args []string) error { return err } - image, _, err := runtime.LookupImage(args[0], nil) + // Allow tagging manifest list instead of resolving instances from manifest + lookupOptions := &libimage.LookupImageOptions{ReturnManifestIfPresent: true} + image, _, err := runtime.LookupImage(args[0], lookupOptions) if err != nil { return err }