aboutsummaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2019-01-09 21:44:05 +0100
committerMiloslav Trmač <mitr@redhat.com>2019-01-14 04:07:23 +0100
commitd559365d7aea4f9957e3efb869480aaeb33b9ec6 (patch)
tree2d8c9408152c9599e83f9a7086c69897d3ca0b26 /libpod/image
parentf92c3ce35033a558a9c86c824a829368a472f873 (diff)
downloadpodman-d559365d7aea4f9957e3efb869480aaeb33b9ec6.tar.gz
podman-d559365d7aea4f9957e3efb869480aaeb33b9ec6.tar.bz2
podman-d559365d7aea4f9957e3efb869480aaeb33b9ec6.zip
Don't try to look up local images with an explicit :latest suffix
imageruntime.getImage, through ParseStoreReference, already uses reference.TagNameOnly on the input, so this extra lookup is completely redundant to the lookup that has already happened. Should not change behavior, apart from speeding up the code a bit. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod/image')
-rw-r--r--libpod/image/image.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 7442f1945..899b8792f 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -226,7 +226,6 @@ func (i *Image) getLocalImage() (*storage.Image, error) {
i.InputName = dest.DockerReference().String()
}
- var taggedName string
img, err := i.imageruntime.getImage(stripSha256(i.InputName))
if err == nil {
return img.image, err
@@ -240,15 +239,6 @@ func (i *Image) getLocalImage() (*storage.Image, error) {
return nil, err
}
- // the inputname isn't tagged, so we assume latest and try again
- if !decomposedImage.isTagged {
- taggedName = fmt.Sprintf("%s:latest", i.InputName)
- img, err = i.imageruntime.getImage(taggedName)
- if err == nil {
- return img.image, nil
- }
- }
-
// The image has a registry name in it and we made sure we looked for it locally
// with a tag. It cannot be local.
if decomposedImage.hasRegistry {