diff --git a/commands/build.go b/commands/build.go index 34ca483f..7feee06e 100644 --- a/commands/build.go +++ b/commands/build.go @@ -487,7 +487,8 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { flags.StringArrayVar(&options.platforms, "platform", platformsDefault, "Set target platform for build") if isExperimental() { - flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets) [experimental]") + flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets)") + flags.SetAnnotation("print", "experimentalCLI", nil) } flags.BoolVar(&options.exportPush, "push", false, `Shorthand for "--output=type=registry"`) @@ -514,10 +515,14 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { flags.StringVar(&options.provenance, "provenance", "", `Shorthand for "--attest=type=provenance"`) if isExperimental() { - flags.StringVar(&invokeFlag, "invoke", "", "Invoke a command after the build [experimental]") - flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect [experimental]") - flags.BoolVar(&options.Detach, "detach", false, "Detach buildx server (supported only on linux) [experimental]") - flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server) [experimental]") + flags.StringVar(&invokeFlag, "invoke", "", "Invoke a command after the build") + flags.SetAnnotation("invoke", "experimentalCLI", nil) + flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect") + flags.SetAnnotation("root", "experimentalCLI", nil) + flags.BoolVar(&options.Detach, "detach", false, "Detach buildx server (supported only on linux)") + flags.SetAnnotation("detach", "experimentalCLI", nil) + flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server)") + flags.SetAnnotation("server-config", "experimentalCLI", nil) } // hidden flags @@ -540,6 +545,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { flags.BoolVar(&ignoreBool, "squash", false, "Squash newly built layers into a single new layer") flags.MarkHidden("squash") flags.SetAnnotation("squash", "flag-warn", []string{"experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency."}) + flags.SetAnnotation("squash", "experimentalCLI", nil) flags.StringVarP(&ignore, "memory", "m", "", "Memory limit") flags.MarkHidden("memory") diff --git a/commands/debug-shell.go b/commands/debug-shell.go index 6b814094..8e255dda 100644 --- a/commands/debug-shell.go +++ b/commands/debug-shell.go @@ -24,6 +24,9 @@ func debugShellCmd(dockerCli command.Cli) *cobra.Command { cmd := &cobra.Command{ Use: "debug-shell", Short: "Start a monitor", + Annotations: map[string]string{ + "experimentalCLI": "", + }, RunE: func(cmd *cobra.Command, args []string) error { printer, err := progress.NewPrinter(context.TODO(), os.Stderr, os.Stderr, progressMode) if err != nil { @@ -55,9 +58,15 @@ func debugShellCmd(dockerCli command.Cli) *cobra.Command { flags := cmd.Flags() - flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect [experimental]") - flags.BoolVar(&options.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server (supported only on linux) [experimental]") - flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server) [experimental]") + flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect") + flags.SetAnnotation("root", "experimentalCLI", nil) + + flags.BoolVar(&options.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server (supported only on linux)") + flags.SetAnnotation("detach", "experimentalCLI", nil) + + flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server)") + flags.SetAnnotation("server-config", "experimentalCLI", nil) + flags.StringVar(&progressMode, "progress", "auto", `Set type of progress output ("auto", "plain", "tty"). Use plain to show container output`) return cmd diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index e3dd0c05..5a091b23 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -24,10 +24,10 @@ Start a build | [`--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 | -| `--detach` | | | Detach buildx server (supported only on linux) [experimental] | +| `--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 | -| `--invoke` | `string` | | Invoke a command after the build [experimental] | +| `--invoke` | `string` | | Invoke a command after the build | | `--label` | `stringArray` | | Set metadata for an image | | [`--load`](#load) | | | Shorthand for `--output=type=docker` | | [`--metadata-file`](#metadata-file) | `string` | | Write build result metadata to the file | @@ -36,16 +36,16 @@ Start a build | `--no-cache-filter` | `stringArray` | | Do not cache specified stages | | [`-o`](#output), [`--output`](#output) | `stringArray` | | Output destination (format: `type=local,dest=path`) | | [`--platform`](#platform) | `stringArray` | | Set target platform for build | -| `--print` | `string` | | Print result of information request (e.g., outline, targets) [experimental] | +| `--print` | `string` | | Print result of information request (e.g., outline, targets) | | [`--progress`](#progress) | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container output | | [`--provenance`](#provenance) | `string` | | Shorthand for `--attest=type=provenance` | | `--pull` | | | Always attempt to pull all referenced images | | [`--push`](#push) | | | Shorthand for `--output=type=registry` | | `-q`, `--quiet` | | | Suppress the build output and print image ID on success | -| `--root` | `string` | | Specify root directory of server to connect [experimental] | +| `--root` | `string` | | Specify root directory of server to connect | | [`--sbom`](#sbom) | `string` | | Shorthand for `--attest=type=sbom` | | [`--secret`](#secret) | `stringArray` | | Secret to expose to the build (format: `id=mysecret[,src=/local/secret]`) | -| `--server-config` | `string` | | Specify buildx server config file (used only when launching new server) [experimental] | +| `--server-config` | `string` | | Specify buildx server config file (used only when launching new server) | | [`--shm-size`](#shm-size) | `bytes` | `0` | Size of `/dev/shm` | | [`--ssh`](#ssh) | `stringArray` | | SSH agent socket or keys to expose to the build (format: `default\|[=\|[,]]`) | | [`-t`](https://docs.docker.com/engine/reference/commandline/build/#tag), [`--tag`](https://docs.docker.com/engine/reference/commandline/build/#tag) | `stringArray` | | Name and optionally a tag (format: `name:tag`) | diff --git a/docs/reference/buildx_debug-shell.md b/docs/reference/buildx_debug-shell.md index 35a1f26e..c06885ae 100644 --- a/docs/reference/buildx_debug-shell.md +++ b/docs/reference/buildx_debug-shell.md @@ -8,10 +8,10 @@ Start a monitor | Name | Type | Default | Description | |:------------------|:---------|:--------|:-----------------------------------------------------------------------------------------| | `--builder` | `string` | | Override the configured builder instance | -| `--detach` | | | Detach buildx server (supported only on linux) [experimental] | +| `--detach` | | | Detach buildx server (supported only on linux) | | `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container output | -| `--root` | `string` | | Specify root directory of server to connect [experimental] | -| `--server-config` | `string` | | Specify buildx server config file (used only when launching new server) [experimental] | +| `--root` | `string` | | Specify root directory of server to connect | +| `--server-config` | `string` | | Specify buildx server config file (used only when launching new server) |