mirror of
https://github.com/containers/podman.git
synced 2025-06-27 21:50:18 +08:00
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
This commit is contained in:

committed by
Atomic Bot

parent
9bd991f477
commit
879453eaf1
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user