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

Merge pull request #37802 from Microsoft/jjh/37687-docker-system-df

Fix docker system df when LCOW and WCOW images loaded
This commit is contained in:
Vincent Demeester 2018-10-08 09:26:35 +02:00 committed by GitHub
commit 2bbd0bd8ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,7 +187,15 @@ func (i *ImageService) Images(imageFilters filters.Args, all bool, withExtraAttr
// lazily init variables
if imagesMap == nil {
allContainers = i.containers.List()
allLayers = i.layerStores[img.OperatingSystem()].Map()
// allLayers is built from all layerstores combined
allLayers = make(map[layer.ChainID]layer.Layer)
for _, ls := range i.layerStores {
layers := ls.Map()
for k, v := range layers {
allLayers[k] = v
}
}
imagesMap = make(map[*image.Image]*types.ImageSummary)
layerRefs = make(map[layer.ChainID]int)
}