1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #31850 from yummypeng/ignore-layer-does-not-exist

Ignore `layer does not exist` error from `docker images`
This commit is contained in:
Vincent Demeester 2017-03-16 14:38:39 +01:00 committed by GitHub
commit 11eb4fe70c

View file

@ -118,6 +118,11 @@ func (daemon *Daemon) Images(imageFilters filters.Args, all bool, withExtraAttrs
if layerID != "" { if layerID != "" {
l, err := daemon.layerStore.Get(layerID) l, err := daemon.layerStore.Get(layerID)
if err != nil { if err != nil {
// The layer may have been deleted between the call to `Map()` or
// `Heads()` and the call to `Get()`, so we just ignore this error
if err == layer.ErrLayerDoesNotExist {
continue
}
return nil, err return nil, err
} }