diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-21 13:45:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 13:45:28 +0000 |
commit | 54f2c9a54034c01a542b2b1c79bbbceb7d12c260 (patch) | |
tree | 9fe7bfb41f073b7f5b02fe816a26cf3dbae55f87 /pkg/api | |
parent | 6338e74cc9cf667ac90242112f1bbae6dc3a555d (diff) | |
parent | f4f96962c0133726b0aac6352720bde411792c47 (diff) | |
download | podman-54f2c9a54034c01a542b2b1c79bbbceb7d12c260.tar.gz podman-54f2c9a54034c01a542b2b1c79bbbceb7d12c260.tar.bz2 podman-54f2c9a54034c01a542b2b1c79bbbceb7d12c260.zip |
Merge pull request #12057 from flouthoc/allow-tagging-manifest-list
tag: Support tagging manifest list instead of resolving to images
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/handlers/compat/images_tag.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/images_tag.go b/pkg/api/handlers/compat/images_tag.go index 7858298be..5d413a821 100644 --- a/pkg/api/handlers/compat/images_tag.go +++ b/pkg/api/handlers/compat/images_tag.go @@ -4,6 +4,7 @@ import ( "fmt" "net/http" + "github.com/containers/common/libimage" "github.com/containers/podman/v3/libpod" "github.com/containers/podman/v3/pkg/api/handlers/utils" api "github.com/containers/podman/v3/pkg/api/types" @@ -16,7 +17,9 @@ func TagImage(w http.ResponseWriter, r *http.Request) { // /v1.xx/images/(name)/tag name := utils.GetName(r) - newImage, _, err := runtime.LibimageRuntime().LookupImage(name, nil) + // Allow tagging manifest list instead of resolving instances from manifest + lookupOptions := &libimage.LookupImageOptions{ManifestList: true} + newImage, _, err := runtime.LibimageRuntime().LookupImage(name, lookupOptions) if err != nil { utils.ImageNotFound(w, name, errors.Wrapf(err, "failed to find image %s", name)) return |