Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builder: Implement `builder prune` to prune build cache #1295

Merged
merged 1 commit into from Aug 18, 2018

Conversation

@tiborvass
Copy link
Contributor

tiborvass commented Aug 17, 2018

This is a version of #1292 without any API changes to make it easier. It would still be better than forcing users to run docker system prune which also removes stopped containers (undesirable side-effect).

This patch adds a new builder subcommand, allowing to add more builder-related commands in the future. Unfortunately build expects an argument so could not be used as a subcommand.

This also implements docker builder prune, which is needed to prune the builder cache manually without having to call docker system prune.

Today when relying on the legacy builder, users are able to prune dangling images (used as build cache) by running docker image prune. This patch allows the same usecase with buildkit.

Signed-off-by: Tibor Vass tibor@docker.com

Add new `builder` subcommand and implement `builder prune` to prune b…
…uild cache.

This patch adds a new builder subcommand, allowing to add more builder-related
commands in the future. Unfortunately `build` expects an argument so could not
be used as a subcommand.

This also implements `docker builder prune`, which is needed to prune the builder
cache manually without having to call `docker system prune`.

Today when relying on the legacy builder, users are able to prune dangling images
(used as build cache) by running `docker image prune`. This patch allows the
same usecase with buildkit.

Signed-off-by: Tibor Vass <tibor@docker.com>

@tiborvass tiborvass force-pushed the tiborvass:cmd-builder-prune-no-options branch from c535cac to f597f2d Aug 17, 2018

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Aug 17, 2018

Codecov Report

Merging #1295 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1295   +/-   ##
=======================================
  Coverage   54.03%   54.03%           
=======================================
  Files         272      272           
  Lines       18072    18072           
=======================================
  Hits         9766     9766           
  Misses       7690     7690           
  Partials      616      616
@dmcgowan

This comment has been minimized.

Copy link
Member

dmcgowan commented Aug 17, 2018

LGTM

I think it is best to get this simple version in first to enable cleanup while discussing what any filtering will look like in the API.

@thaJeztah
Copy link
Member

thaJeztah left a comment

LGTM

@vdemeester
Copy link
Member

vdemeester left a comment

LGTM 🐯

@andrewhsu andrewhsu merged commit b3d8c5d into docker:master Aug 18, 2018

9 checks passed

ci/circleci: cross Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: shellcheck Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: validate Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 9641739...f597f2d
Details
codecov/project 54.03% remains the same compared to 9641739
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
dco-signed All commits are signed

@GordonTheTurtle GordonTheTurtle added this to the 18.09.0 milestone Aug 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.