-
Notifications
You must be signed in to change notification settings - Fork 481
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
Add an flag to buildx rm to keep the buildkitd daemon running #852
Add an flag to buildx rm to keep the buildkitd daemon running #852
Conversation
commands/rm.go
Outdated
@@ -70,23 +71,28 @@ func rmCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { | |||
|
|||
flags := cmd.Flags() | |||
flags.BoolVar(&options.keepState, "keep-state", false, "Keep BuildKit state") | |||
flags.BoolVar(&options.keepBuildkitd, "keep-buildkitd", false, "Keep the buildkitd daemon running") |
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.
I think --keep-instance
would be a better name.
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.
@crazy-max maybe --keep-daemon
? "Instance" is not very descriptive either as anything can have "an instance".
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.
yes --keep-daemon
sgtm 👍
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.
--keep-daemon
sgtm too 👍
I'll make the change
docs/reference/buildx_rm.md
Outdated
@@ -34,7 +34,7 @@ Same as [`buildx --builder`](buildx.md#builder). | |||
Keep BuildKit state, so it can be reused by a new builder with the same name. | |||
Currently, only supported by the [`docker-container` driver](buildx_create.md#driver). | |||
|
|||
### <a name="keep-buildkitd"></a> Keep the buildkitd daemon running (--keep-buildkitd) | |||
### <a name="keep-daemon"></a> Keep the buildkitd daemon running (--keep-daemon) | |||
|
|||
Keep the buildkitd daemon running after the buildx context is removed. This is useful is when you manage buildkitd daemons and buildx contexts independently. |
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.
This is useful is when
> This is useful when
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.
Please also squash the commits. https://github.com/docker/buildx/blob/master/.github/CONTRIBUTING.md#review
Add --keep-daemon to the `rm` command option to preserve the buildkitd daemon after the buildx context is deleted. Signed-off-by: Mayeul Blanzat <[email protected]>
8866bb2
to
72dab55
Compare
Sure 👍 Just did it |
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 PR adds the flag
--keep-buildkitd
to thebuildx rm
command to preserve the buildkitd daemon after the buildx context is deleted.This flag can be useful when someone uses the
kubernetes
driver and manages thebuildkit
deployment outside ofbuildx
.Fixes #794
Signed-off-by: Mayeul Blanzat [email protected]