From 98380b179133a52e2a74fb3421d7f49fc380ac2d Mon Sep 17 00:00:00 2001 From: John Howard Date: Wed, 22 Aug 2018 15:29:18 -0700 Subject: [PATCH] Fix `docker system df` when LCOW and WCOW images loaded Signed-off-by: John Howard --- daemon/images/images.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/daemon/images/images.go b/daemon/images/images.go index 49212341c5..d1ca978f3b 100644 --- a/daemon/images/images.go +++ b/daemon/images/images.go @@ -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) }