Skip to content

Commit 56f7bd0

Browse files
austinvazquezthaJeztah
authored andcommitted
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]> (cherry picked from commit 7d85d8f) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 7c3ec3e commit 56f7bd0

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
@@ -85,9 +85,12 @@ func runPrune(ctx context.Context, dockerCli command.Cli, options pruneOptions)
8585
}
8686

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

0 commit comments

Comments
 (0)