|
@@ -1090,9 +1090,9 @@ func (daemon *Daemon) ImageGetCached(imgID string, config *runconfig.Config) (*i
|
|
// Loop on the children of the given image and check the config
|
|
// Loop on the children of the given image and check the config
|
|
var match *image.Image
|
|
var match *image.Image
|
|
for elem := range imageMap[imgID] {
|
|
for elem := range imageMap[imgID] {
|
|
- img, err := daemon.Graph().Get(elem)
|
|
|
|
- if err != nil {
|
|
|
|
- return nil, err
|
|
|
|
|
|
+ img, ok := images[elem]
|
|
|
|
+ if !ok {
|
|
|
|
+ return nil, fmt.Errorf("unable to find image %q", elem)
|
|
}
|
|
}
|
|
if runconfig.Compare(&img.ContainerConfig, config) {
|
|
if runconfig.Compare(&img.ContainerConfig, config) {
|
|
if match == nil || match.Created.Before(img.Created) {
|
|
if match == nil || match.Created.Before(img.Created) {
|