summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-29 04:43:19 -0400
committerGitHub <noreply@github.com>2020-06-29 04:43:19 -0400
commit1e429704172a774fc3b045dfc0ae427aa8cea5a3 (patch)
tree306b85cb132fb822d2ae0b1764a6ad399148edb0
parent9f8472afc98d117a18e930ad277b76e733ba085f (diff)
parent9eebfd40ae2408daa880fdfe48480b346772174b (diff)
downloadpodman-1e429704172a774fc3b045dfc0ae427aa8cea5a3.tar.gz
podman-1e429704172a774fc3b045dfc0ae427aa8cea5a3.tar.bz2
podman-1e429704172a774fc3b045dfc0ae427aa8cea5a3.zip
Merge pull request #6802 from lsm5/v2.0-registry-port-number
Account for non-default port number in image name (backported from master)
-rw-r--r--cmd/podman/images/list.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go
index 83acb53d9..b7a8b8911 100644
--- a/cmd/podman/images/list.go
+++ b/cmd/podman/images/list.go
@@ -193,7 +193,7 @@ func sortImages(imageS []*entities.ImageSummary) []imageReporter {
}
func tokenRepoTag(tag string) (string, string) {
- tokens := strings.SplitN(tag, ":", 2)
+ tokens := strings.Split(tag, ":")
switch len(tokens) {
case 0:
return tag, ""
@@ -201,6 +201,8 @@ func tokenRepoTag(tag string) (string, string) {
return tokens[0], ""
case 2:
return tokens[0], tokens[1]
+ case 3:
+ return tokens[0] + ":" + tokens[1], tokens[2]
default:
return "<N/A>", ""
}