Skip to content

Commit

Permalink
tag: Support tagging manifest list instead of resolving to images
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
flouthoc committed Aug 27, 2021
1 parent a20b5f4 commit af60968
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/buildah/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit af60968

Please sign in to comment.