summaryrefslogtreecommitdiff
path: root/libpod/image/parts.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-07-12 13:44:26 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-13 13:37:49 +0000
commit6f1dd44b29be4a3046c3bcd5d4d44f7acc5f88fc (patch)
tree3303735f8d41331a73f0e16d6391edcb744c1b42 /libpod/image/parts.go
parenta2dde5a50d21f8857a57d412a8a1c4c8f731a8d1 (diff)
downloadpodman-6f1dd44b29be4a3046c3bcd5d4d44f7acc5f88fc.tar.gz
podman-6f1dd44b29be4a3046c3bcd5d4d44f7acc5f88fc.tar.bz2
podman-6f1dd44b29be4a3046c3bcd5d4d44f7acc5f88fc.zip
fix pull image that includes a sha
when pulling an image that includes a sha such as: centos/nginx-112-centos7@sha256:42330f7f29ba1ad67819f4ff3ae2472f62de13a827a74736a5098728462212e7 the final image name in libpod should not contain portions of the sha itself nor the sha identifier. and like docker, we provide a 'none' tag as well. this should fix #877 Signed-off-by: baude <bbaude@redhat.com> Closes: #1085 Approved by: mheon
Diffstat (limited to 'libpod/image/parts.go')
-rw-r--r--libpod/image/parts.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/image/parts.go b/libpod/image/parts.go
index 979f223fc..07a119c28 100644
--- a/libpod/image/parts.go
+++ b/libpod/image/parts.go
@@ -2,6 +2,7 @@ package image
import (
"fmt"
+ "strings"
"github.com/containers/image/docker/reference"
)
@@ -33,6 +34,9 @@ func decompose(input string) (imageParts, error) {
}
if !isTagged {
tag = "latest"
+ if strings.Contains(input, "@sha256:") {
+ tag = "none"
+ }
} else {
tag = ntag.Tag()
}