mirror of
https://github.com/containers/podman.git
synced 2025-06-26 04:46:57 +08:00
Strip transport from image name when looking for local image
When a user pulls an image using a transport, like docker-daemon, we try to lookup the new image in storage by the input name after the pull. Because the input name has a transport (different than local storage), that lookup would fail. Signed-off-by: baude <bbaude@redhat.com> Closes: #644 Approved by: rhatdan
This commit is contained in:
@ -183,6 +183,12 @@ func (i *Image) getLocalImage() (*storage.Image, error) {
|
||||
if i.InputName == "" {
|
||||
return nil, errors.Errorf("input name is blank")
|
||||
}
|
||||
// Check if the input name has a transport and if so strip it
|
||||
dest, err := alltransports.ParseImageName(i.InputName)
|
||||
if err == nil && dest.DockerReference() != nil {
|
||||
i.InputName = dest.DockerReference().String()
|
||||
}
|
||||
|
||||
var taggedName string
|
||||
img, err := i.imageruntime.getImage(stripSha256(i.InputName))
|
||||
if err == nil {
|
||||
|
Reference in New Issue
Block a user