c8d/list: Fix diffIDs being outputted instead of chainIDs

The `identity.ChainIDs` call was accidentally removed in
b37ced2551.

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>
This commit is contained in:
Paweł Gronowski 2024-03-20 11:14:15 +01:00
parent 0c2d83b5fb
commit ad8a5a5732
No known key found for this signature in database
GPG key ID: B85EFCFE26DEF92A

View file

@ -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