Skip to content

Commit

Permalink
Merge pull request #11651 from vrothberg/fix-11557
Browse files Browse the repository at this point in the history
remote untag: support digests
  • Loading branch information
openshift-merge-robot authored Sep 20, 2021
2 parents b906ecb + 92ee2f3 commit f7d7fc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/domain/infra/tunnel/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
3 changes: 3 additions & 0 deletions test/system/001-basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ function setup() {

# Now untag the digest reference again.
run_podman untag $IMAGE $IMAGE@$digest

# Make sure the original image is still present (#11557).
run_podman image exists $IMAGE
}

# PR #7212: allow --remote anywhere before subcommand, not just as 1st flag
Expand Down

0 comments on commit f7d7fc2

Please sign in to comment.