diff options
Diffstat (limited to 'libpod/image')
-rw-r--r-- | libpod/image/image.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index c79844f7f..009c51886 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -457,8 +457,14 @@ func (i *Image) MatchesID(id string) bool { // toStorageReference returns a *storageReference from an Image func (i *Image) toStorageReference() (types.ImageReference, error) { + var lookupName string if i.storeRef == nil { - storeRef, err := is.Transport.ParseStoreReference(i.imageruntime.store, i.ID()) + if i.image != nil { + lookupName = i.ID() + } else { + lookupName = i.InputName + } + storeRef, err := is.Transport.ParseStoreReference(i.imageruntime.store, lookupName) if err != nil { return nil, err } |