From 7dec9fd6e7a141e28839419ce6f49c2b7f6934b6 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 23 Jun 2023 10:28:50 +0200 Subject: [PATCH] update flag-description for --cgroup-parent This attempts to make it clearer that the --cgroup-parent option is only used for the containers used during build. Instead of mentioning "build container", I opted for using "RUN instructions" (to match the --network description), although this may not be ideal (as it assumes the "Dockerfile" front-end, which of course may not be the case). Signed-off-by: Sebastiaan van Stijn --- commands/build.go | 2 +- docs/reference/buildx_build.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/build.go b/commands/build.go index 7feee06e..3b6430ac 100644 --- a/commands/build.go +++ b/commands/build.go @@ -464,7 +464,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { flags.StringArrayVar(&options.cacheTo, "cache-to", []string{}, `Cache export destinations (e.g., "user/app:cache", "type=local,dest=path/to/dir")`) - flags.StringVar(&options.cgroupParent, "cgroup-parent", "", "Optional parent cgroup for the container") + flags.StringVar(&options.cgroupParent, "cgroup-parent", "", `Set the parent cgroup for the "RUN" instructions during build`) flags.SetAnnotation("cgroup-parent", annotation.ExternalURL, []string{"https://docs.docker.com/engine/reference/commandline/build/#cgroup-parent"}) flags.StringArrayVar(&options.contexts, "build-context", []string{}, "Additional build contexts (e.g., name=path)") diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index 5a091b23..b1efa694 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -23,7 +23,7 @@ Start a build | [`--builder`](#builder) | `string` | | Override the configured builder instance | | [`--cache-from`](#cache-from) | `stringArray` | | External cache sources (e.g., `user/app:cache`, `type=local,src=path/to/dir`) | | [`--cache-to`](#cache-to) | `stringArray` | | Cache export destinations (e.g., `user/app:cache`, `type=local,dest=path/to/dir`) | -| [`--cgroup-parent`](https://docs.docker.com/engine/reference/commandline/build/#cgroup-parent) | `string` | | Optional parent cgroup for the container | +| [`--cgroup-parent`](https://docs.docker.com/engine/reference/commandline/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | | `--detach` | | | Detach buildx server (supported only on linux) | | [`-f`](https://docs.docker.com/engine/reference/commandline/build/#file), [`--file`](https://docs.docker.com/engine/reference/commandline/build/#file) | `string` | | Name of the Dockerfile (default: `PATH/Dockerfile`) | | `--iidfile` | `string` | | Write the image ID to the file |