Skip to content

Commit

Permalink
c8d/list: Fix diffIDs being outputted instead of chainIDs
Browse files Browse the repository at this point in the history
The `identity.ChainIDs` call was accidentally removed in
b37ced2.

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 <pawel.gronowski@docker.com>
  • Loading branch information
vvoland committed Mar 20, 2024
1 parent 0c2d83b commit ad8a5a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/containerd/image_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad8a5a5

Please sign in to comment.