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 d936163
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
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
13 changes: 11 additions & 2 deletions vendor/github.com/containers/common/libimage/runtime.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d936163

Please sign in to comment.