diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-09-20 12:50:16 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-09-20 15:06:37 +0200 |
commit | 92ee2f372ba06ec7c09008d9a28e4c9ce35bf51a (patch) | |
tree | 5cdea0f9ffd5d83f067a89166b0a78cf8f6814b0 /pkg | |
parent | b906ecbb5bc887f5123a0f61a5a51782aa34357f (diff) | |
download | podman-92ee2f372ba06ec7c09008d9a28e4c9ce35bf51a.tar.gz podman-92ee2f372ba06ec7c09008d9a28e4c9ce35bf51a.tar.bz2 podman-92ee2f372ba06ec7c09008d9a28e4c9ce35bf51a.zip |
remote untag: support digests
Fix a bug when remotely untagging an image via tag@digest.
The digest has been lost in the remote client and hence led
to a wrong behaviour on the server.
Fixes: #11557
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index db4e14aba..9a746d68c 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -165,6 +165,9 @@ func (ir *ImageEngine) Untag(ctx context.Context, nameOrID string, tags []string if t, ok := ref.(reference.Tagged); ok { tag = t.Tag() } + if t, ok := ref.(reference.Digested); ok { + tag += "@" + t.Digest().String() + } if r, ok := ref.(reference.Named); ok { repo = r.Name() } |