Merge pull request #362 from nalind/nameasdigest
Don't try to parse an image ID a second time
This commit is contained in:
commit
0639f06d03
1 changed files with 1 additions and 8 deletions
|
@ -167,7 +167,7 @@ func (r *runtimeService) createContainerOrPodSandbox(systemContext *types.System
|
|||
ref, err = istorage.Transport.ParseStoreReference(r.image.GetStore(), otherRef.DockerReference().FullName())
|
||||
}
|
||||
if err != nil {
|
||||
// maybe it's just imageID
|
||||
// Maybe the image ID is sufficient?
|
||||
ref, err = istorage.Transport.ParseStoreReference(r.image.GetStore(), "@"+imageID)
|
||||
if err != nil {
|
||||
return ContainerInfo{}, err
|
||||
|
@ -175,13 +175,6 @@ func (r *runtimeService) createContainerOrPodSandbox(systemContext *types.System
|
|||
}
|
||||
}
|
||||
img, err := istorage.Transport.GetStoreImage(r.image.GetStore(), ref)
|
||||
if img == nil && err == storage.ErrImageUnknown && imageID != "" {
|
||||
ref, err = istorage.Transport.ParseStoreReference(r.image.GetStore(), "@"+imageID)
|
||||
if err != nil {
|
||||
return ContainerInfo{}, err
|
||||
}
|
||||
img, err = istorage.Transport.GetStoreImage(r.image.GetStore(), ref)
|
||||
}
|
||||
if img == nil && err == storage.ErrImageUnknown && imageName == r.pauseImage {
|
||||
image := imageID
|
||||
if imageName != "" {
|
||||
|
|
Loading…
Reference in a new issue