summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/images.go
diff options
context:
space:
mode:
authorAditya Rajan <arajan@redhat.com>2021-10-21 16:38:04 +0530
committerAditya Rajan <arajan@redhat.com>2021-10-21 17:44:31 +0530
commitf4f96962c0133726b0aac6352720bde411792c47 (patch)
tree62536554e2945d5fd911908d63f76e657769ea24 /pkg/domain/infra/abi/images.go
parent4268a4afee4c1d030c1f901398e6a9b3f282eae3 (diff)
downloadpodman-f4f96962c0133726b0aac6352720bde411792c47.tar.gz
podman-f4f96962c0133726b0aac6352720bde411792c47.tar.bz2
podman-f4f96962c0133726b0aac6352720bde411792c47.zip
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. Port of: https://github.com/containers/buildah/pull/3483 Signed-off-by: Aditya Rajan <arajan@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi/images.go')
-rw-r--r--pkg/domain/infra/abi/images.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index d2222c017..8878bf128 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -331,7 +331,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
}