Merge pull request #6000 from vvoland/image-tree-totalcontent
cli/command/image: Fix total content size calculation in image tree
This commit is contained in:
commit
c718d3f13c
@ -54,6 +54,8 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) error
|
||||
var totalContent int64
|
||||
children := make([]subImage, 0, len(img.Manifests))
|
||||
for _, im := range img.Manifests {
|
||||
totalContent += im.Size.Content
|
||||
|
||||
if im.Kind == imagetypes.ManifestKindAttestation {
|
||||
attested[im.AttestationData.For] = true
|
||||
continue
|
||||
@ -78,7 +80,6 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) error
|
||||
details.InUse = true
|
||||
}
|
||||
|
||||
totalContent += im.Size.Content
|
||||
children = append(children, sub)
|
||||
|
||||
// Add extra spacing between images if there's at least one entry with children.
|
||||
|
Loading…
x
Reference in New Issue
Block a user