Skip to content

Commit 7d85d8f

Browse files
committed
Set ReservedSpace field in preparation of KeepStorage deprecation
This change updates the builder prune command to send the `ReservedSpace` parameter in preparation of `KeepStorage` deprecation in API v1.52. Signed-off-by: Austin Vazquez <[email protected]>
1 parent 1f12d79 commit 7d85d8f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cli/command/builder/prune.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ func runPrune(ctx context.Context, dockerCli command.Cli, options pruneOptions)
8888
}
8989

9090
report, err := dockerCli.Client().BuildCachePrune(ctx, build.CachePruneOptions{
91-
All: options.all,
92-
KeepStorage: options.keepStorage.Value(), // FIXME(thaJeztah): rewrite to use new options; see https://github.com/moby/moby/pull/48720
93-
Filters: pruneFilters,
91+
All: options.all,
92+
// TODO(austinvazquez): remove when updated to use github.com/moby/moby/[email protected]
93+
// See https://github.com/moby/moby/pull/50772 for more details.
94+
KeepStorage: options.keepStorage.Value(),
95+
ReservedSpace: options.keepStorage.Value(),
96+
Filters: pruneFilters,
9497
})
9598
if err != nil {
9699
return 0, "", err

0 commit comments

Comments
 (0)