-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
builder: Implement builder prune
to prune build cache
#1295
Conversation
…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>
c535cac
to
f597f2d
Compare
Codecov Report
@@ Coverage Diff @@
## master #1295 +/- ##
=======================================
Coverage 54.03% 54.03%
=======================================
Files 272 272
Lines 18072 18072
=======================================
Hits 9766 9766
Misses 7690 7690
Partials 616 616 |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐯
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 calldocker 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