summaryrefslogtreecommitdiff
path: root/libpod/image/image.go
diff options
context:
space:
mode:
authorhaircommander <pehunt@redhat.com>2018-07-23 12:56:24 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-08 21:04:11 +0000
commit879453eaf16675f732dd87fd250ccaaac72f4285 (patch)
tree297b6a1fef1491353a1478ae278386583545fcaa /libpod/image/image.go
parent9bd991f477ab2bb4428df6286452516c3deb970e (diff)
downloadpodman-879453eaf16675f732dd87fd250ccaaac72f4285.tar.gz
podman-879453eaf16675f732dd87fd250ccaaac72f4285.tar.bz2
podman-879453eaf16675f732dd87fd250ccaaac72f4285.zip
Fix ambiguity in adding localhost to podman save
...and some naming decisions. This change ensures podman save doesn't incorrectly prepend localhost when saving an image. Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1140 Approved by: rhatdan
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r--libpod/image/image.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 9447ec9e1..57891a463 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -258,7 +258,7 @@ func (i *Image) getLocalImage() (*storage.Image, error) {
}
// if the image is saved with the repository localhost, searching with localhost prepended is necessary
// We don't need to strip the sha because we have already determined it is not an ID
- img, err = i.imageruntime.getImage(DefaultLocalRepo + "/" + i.InputName)
+ img, err = i.imageruntime.getImage(fmt.Sprintf("%s/%s", DefaultLocalRegistry, i.InputName))
if err == nil {
return img.image, err
}
@@ -465,7 +465,7 @@ func normalizeTag(tag string) (string, error) {
}
// If the input doesn't specify a registry, set the registry to localhost
if !decomposedTag.hasRegistry {
- tag = fmt.Sprintf("%s/%s", DefaultLocalRepo, tag)
+ tag = fmt.Sprintf("%s/%s", DefaultLocalRegistry, tag)
}
return tag, nil
}