diff --git a/commands/build.go b/commands/build.go index 9ae01139..9cf34404 100644 --- a/commands/build.go +++ b/commands/build.go @@ -699,7 +699,7 @@ type commonFlags struct { func commonBuildFlags(options *commonFlags, flags *pflag.FlagSet) { options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image") - flags.StringVar(&options.progress, "progress", "auto", `Set type of progress output ("auto", "plain", "tty"). Use plain to show container output`) + flags.StringVar(&options.progress, "progress", "auto", `Set type of progress output ("auto", "plain", "tty", "rawjson"). Use plain to show container output`) options.pull = flags.Bool("pull", false, "Always attempt to pull all referenced images") flags.StringVar(&options.metadataFile, "metadata-file", "", "Write build result metadata to a file") } diff --git a/commands/debug/root.go b/commands/debug/root.go index b16c75e4..086f0435 100644 --- a/commands/debug/root.go +++ b/commands/debug/root.go @@ -80,7 +80,7 @@ func RootCmd(dockerCli command.Cli, children ...DebuggableCmd) *cobra.Command { flags.StringVar(&controlOptions.Root, "root", "", "Specify root directory of server to connect for the monitor") flags.BoolVar(&controlOptions.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server for the monitor (supported only on linux)") flags.StringVar(&controlOptions.ServerConfig, "server-config", "", "Specify buildx server config file for the monitor (used only when launching new server)") - flags.StringVar(&progressMode, "progress", "auto", `Set type of progress output ("auto", "plain", "tty") for the monitor. Use plain to show container output`) + flags.StringVar(&progressMode, "progress", "auto", `Set type of progress output ("auto", "plain", "tty", "rawjson") for the monitor. Use plain to show container output`) cobrautil.MarkFlagsExperimental(flags, "invoke", "on", "root", "detach", "server-config") diff --git a/commands/dial_stdio.go b/commands/dial_stdio.go index b89a9ec1..e991e2e5 100644 --- a/commands/dial_stdio.go +++ b/commands/dial_stdio.go @@ -126,6 +126,6 @@ func dialStdioCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { flags := cmd.Flags() flags.StringVar(&opts.platform, "platform", os.Getenv("DOCKER_DEFAULT_PLATFORM"), "Target platform: this is used for node selection") - flags.StringVar(&opts.progress, "progress", "quiet", "Set type of progress output (auto, plain, tty).") + flags.StringVar(&opts.progress, "progress", "quiet", `Set type of progress output ("auto", "plain", "tty", "rawjson"). Use plain to show container output`) return cmd } diff --git a/commands/imagetools/create.go b/commands/imagetools/create.go index 5239bd0f..934602ee 100644 --- a/commands/imagetools/create.go +++ b/commands/imagetools/create.go @@ -282,7 +282,7 @@ func createCmd(dockerCli command.Cli, opts RootOptions) *cobra.Command { flags.StringArrayVarP(&options.tags, "tag", "t", []string{}, "Set reference for new image") flags.BoolVar(&options.dryrun, "dry-run", false, "Show final image instead of pushing") flags.BoolVar(&options.actionAppend, "append", false, "Append to existing manifest") - flags.StringVar(&options.progress, "progress", "auto", `Set type of progress output ("auto", "plain", "tty"). Use plain to show container output`) + flags.StringVar(&options.progress, "progress", "auto", `Set type of progress output ("auto", "plain", "tty", "rawjson"). Use plain to show container output`) flags.StringArrayVarP(&options.annotations, "annotation", "", []string{}, "Add annotation to the image") flags.BoolVar(&options.preferIndex, "prefer-index", true, "When only a single source is specified, prefer outputting an image index or manifest list instead of performing a carbon copy") diff --git a/docs/reference/buildx_bake.md b/docs/reference/buildx_bake.md index 03d90bbd..d50b8f77 100644 --- a/docs/reference/buildx_bake.md +++ b/docs/reference/buildx_bake.md @@ -13,20 +13,20 @@ Build from a file ### Options -| Name | Type | Default | Description | -|:------------------------------------|:--------------|:--------|:-----------------------------------------------------------------------------------------| -| [`--builder`](#builder) | `string` | | Override the configured builder instance | -| [`-f`](#file), [`--file`](#file) | `stringArray` | | Build definition file | -| `--load` | | | Shorthand for `--set=*.output=type=docker` | -| [`--metadata-file`](#metadata-file) | `string` | | Write build result metadata to a file | -| [`--no-cache`](#no-cache) | | | Do not use cache when building the image | -| [`--print`](#print) | | | Print the options without building | -| [`--progress`](#progress) | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container output | -| [`--provenance`](#provenance) | `string` | | Shorthand for `--set=*.attest=type=provenance` | -| [`--pull`](#pull) | | | Always attempt to pull all referenced images | -| `--push` | | | Shorthand for `--set=*.output=type=registry` | -| [`--sbom`](#sbom) | `string` | | Shorthand for `--set=*.attest=type=sbom` | -| [`--set`](#set) | `stringArray` | | Override target value (e.g., `targetpattern.key=value`) | +| Name | Type | Default | Description | +|:------------------------------------|:--------------|:--------|:----------------------------------------------------------------------------------------------------| +| [`--builder`](#builder) | `string` | | Override the configured builder instance | +| [`-f`](#file), [`--file`](#file) | `stringArray` | | Build definition file | +| `--load` | | | Shorthand for `--set=*.output=type=docker` | +| [`--metadata-file`](#metadata-file) | `string` | | Write build result metadata to a file | +| [`--no-cache`](#no-cache) | | | Do not use cache when building the image | +| [`--print`](#print) | | | Print the options without building | +| [`--progress`](#progress) | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`). Use plain to show container output | +| [`--provenance`](#provenance) | `string` | | Shorthand for `--set=*.attest=type=provenance` | +| [`--pull`](#pull) | | | Always attempt to pull all referenced images | +| `--push` | | | Shorthand for `--set=*.output=type=registry` | +| [`--sbom`](#sbom) | `string` | | Shorthand for `--set=*.attest=type=sbom` | +| [`--set`](#set) | `stringArray` | | Override target value (e.g., `targetpattern.key=value`) | diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index 13513f27..ff597807 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -38,7 +38,7 @@ Start a build | [`--no-cache-filter`](#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 | -| [`--progress`](#progress) | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container output | +| [`--progress`](#progress) | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`). 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` | @@ -551,8 +551,8 @@ $ docker buildx build --platform=darwin . --progress=VALUE ``` -Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container -output (default "auto"). +Set type of progress output (`auto`, `plain`, `tty`, `rawjson`). Use `plain` to show container +output (default `auto`). > **Note** > @@ -578,6 +578,9 @@ $ docker buildx build --load --progress=plain . > Check also the [`BUILDKIT_COLORS`](https://docs.docker.com/build/building/variables/#buildkit_colors) > environment variable for modifying the colors of the terminal output. +The `rawjson` output marshals the solve status events from BuildKit to JSON lines. +This mode is designed to be read by an external program. + ### Create provenance attestations (--provenance) Shorthand for [`--attest=type=provenance`](#attest), used to configure diff --git a/docs/reference/buildx_debug.md b/docs/reference/buildx_debug.md index 0db3e5c0..a07385c9 100644 --- a/docs/reference/buildx_debug.md +++ b/docs/reference/buildx_debug.md @@ -12,15 +12,15 @@ Start debugger (EXPERIMENTAL) ### Options -| Name | Type | Default | Description | -|:------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------| -| `--builder` | `string` | | Override the configured builder instance | -| `--detach` | `bool` | `true` | Detach buildx server for the monitor (supported only on linux) (EXPERIMENTAL) | -| `--invoke` | `string` | | Launch a monitor with executing specified command (EXPERIMENTAL) | -| `--on` | `string` | `error` | When to launch the monitor ([always, error]) (EXPERIMENTAL) | -| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`) for the monitor. Use plain to show container output | -| `--root` | `string` | | Specify root directory of server to connect for the monitor (EXPERIMENTAL) | -| `--server-config` | `string` | | Specify buildx server config file for the monitor (used only when launching new server) (EXPERIMENTAL) | +| Name | Type | Default | Description | +|:------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------| +| `--builder` | `string` | | Override the configured builder instance | +| `--detach` | `bool` | `true` | Detach buildx server for the monitor (supported only on linux) (EXPERIMENTAL) | +| `--invoke` | `string` | | Launch a monitor with executing specified command (EXPERIMENTAL) | +| `--on` | `string` | `error` | When to launch the monitor ([always, error]) (EXPERIMENTAL) | +| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`) for the monitor. Use plain to show container output | +| `--root` | `string` | | Specify root directory of server to connect for the monitor (EXPERIMENTAL) | +| `--server-config` | `string` | | Specify buildx server config file for the monitor (used only when launching new server) (EXPERIMENTAL) | diff --git a/docs/reference/buildx_debug_build.md b/docs/reference/buildx_debug_build.md index ca8b825f..30ef7b87 100644 --- a/docs/reference/buildx_debug_build.md +++ b/docs/reference/buildx_debug_build.md @@ -34,7 +34,7 @@ Start a build | `--no-cache-filter` | `stringArray` | | Do not cache specified stages | | `-o`, `--output` | `stringArray` | | Output destination (format: `type=local,dest=path`) | | `--platform` | `stringArray` | | Set target platform for build | -| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container output | +| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`). Use plain to show container output | | `--provenance` | `string` | | Shorthand for `--attest=type=provenance` | | `--pull` | | | Always attempt to pull all referenced images | | `--push` | | | Shorthand for `--output=type=registry` | diff --git a/docs/reference/buildx_dial-stdio.md b/docs/reference/buildx_dial-stdio.md index 0703f373..d78f8b30 100644 --- a/docs/reference/buildx_dial-stdio.md +++ b/docs/reference/buildx_dial-stdio.md @@ -5,11 +5,11 @@ Proxy current stdio streams to builder instance ### Options -| Name | Type | Default | Description | -|:-------------|:---------|:--------|:-------------------------------------------------| -| `--builder` | `string` | | Override the configured builder instance | -| `--platform` | `string` | | Target platform: this is used for node selection | -| `--progress` | `string` | `quiet` | Set type of progress output (auto, plain, tty). | +| Name | Type | Default | Description | +|:-------------|:---------|:--------|:----------------------------------------------------------------------------------------------------| +| `--builder` | `string` | | Override the configured builder instance | +| `--platform` | `string` | | Target platform: this is used for node selection | +| `--progress` | `string` | `quiet` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`). Use plain to show container output | diff --git a/docs/reference/buildx_imagetools_create.md b/docs/reference/buildx_imagetools_create.md index 1b3bc06a..ce8827fb 100644 --- a/docs/reference/buildx_imagetools_create.md +++ b/docs/reference/buildx_imagetools_create.md @@ -17,7 +17,7 @@ Create a new image based on source images | [`--dry-run`](#dry-run) | | | Show final image instead of pushing | | [`-f`](#file), [`--file`](#file) | `stringArray` | | Read source descriptor from file | | `--prefer-index` | `bool` | `true` | When only a single source is specified, prefer outputting an image index or manifest list instead of performing a carbon copy | -| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container output | +| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`). Use plain to show container output | | [`-t`](#tag), [`--tag`](#tag) | `stringArray` | | Set reference for new image |