mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-10 17:47:52 +00:00
Use imageParts.referenceWithRegistry in Image.getLocalImage
... to make sure everything uses the same code path. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
d559365d7a
commit
cf40b71614
1 changed files with 5 additions and 3 deletions
|
|
@ -243,12 +243,14 @@ func (i *Image) getLocalImage() (*storage.Image, error) {
|
|||
// with a tag. It cannot be local.
|
||||
if decomposedImage.hasRegistry {
|
||||
return nil, errors.Wrapf(ErrNoSuchImage, imageError)
|
||||
|
||||
}
|
||||
|
||||
// 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(fmt.Sprintf("%s/%s", DefaultLocalRegistry, i.InputName))
|
||||
ref, err := decomposedImage.referenceWithRegistry(DefaultLocalRegistry)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
img, err = i.imageruntime.getImage(ref.String())
|
||||
if err == nil {
|
||||
return img.image, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue