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
Collaborator

@tiborvass 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

…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>
@codecov-io
Copy link

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
Copy link
Contributor

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.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants