Skip to content

Commit b9fec36

Browse files
committed
debugging: try to replicate old values
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 575d58e commit b9fec36

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

cli/command/system/df.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package system
22

33
import (
44
"context"
5+
"encoding/json"
6+
"fmt"
57

68
"github.com/docker/cli/cli"
79
"github.com/docker/cli/cli/command"
@@ -54,6 +56,15 @@ func runDiskUsage(ctx context.Context, dockerCli command.Cli, opts diskUsageOpti
5456
format = formatter.TableFormatKey
5557
}
5658

59+
du2 := du
60+
du2.Images.Items = nil
61+
du2.BuildCache.Items = nil
62+
du2.Containers.Items = nil
63+
du2.Volumes.Items = nil
64+
65+
out, _ := json.Marshal(&du2)
66+
fmt.Println(string(out))
67+
5768
duCtx := formatter.DiskUsageContext{
5869
Context: formatter.Context{
5970
Output: dockerCli.Out(),

vendor/github.com/moby/moby/client/system_disk_usage.go

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)