From ad8a5a5732ee3e66100d92f70de8298bd7dfdb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 20 Mar 2024 11:14:15 +0100 Subject: [PATCH] c8d/list: Fix diffIDs being outputted instead of chainIDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `identity.ChainIDs` call was accidentally removed in b37ced255103c2dfd36c42685bdd9390f74eb10f. This broke the shared size calculation for images with more than one layer that were sharing the same compressed layer. This was could be reproduced with: ``` $ docker pull docker.io/docker/desktop-kubernetes-coredns:v1.11.1 $ docker pull docker.io/docker/desktop-kubernetes-etcd:3.5.10-0 $ docker system df ``` Signed-off-by: Paweł Gronowski --- daemon/containerd/image_list.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/containerd/image_list.go b/daemon/containerd/image_list.go index b7fb926725..80b2409015 100644 --- a/daemon/containerd/image_list.go +++ b/daemon/containerd/image_list.go @@ -255,11 +255,13 @@ func (i *ImageService) imageSummary(ctx context.Context, img images.Image, platf target := img.Target() - chainIDs, err := img.RootFS(ctx) + diffIDs, err := img.RootFS(ctx) if err != nil { return err } + chainIDs := identity.ChainIDs(diffIDs) + ts, _, err := i.singlePlatformSize(ctx, img) if err != nil { return err