fix examples and headings

Signed-off-by: sarahsanders-docker <sarah.sanders@docker.com>
This commit is contained in:
sarahsanders-docker 2025-04-25 09:57:25 -04:00 committed by Tonis Tiigi
parent 03019049e8
commit 6ed39b2618
No known key found for this signature in database
GPG Key ID: AFA9DE5F8AB7AF39
9 changed files with 55 additions and 41 deletions

View File

@ -7,10 +7,10 @@ Export a build into Docker Desktop bundle
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------|:---------|:--------|:-----------------------------------------| |:-----------------|:---------|:--------|:-----------------------------------------|
| `--all` | `bool` | | Export all records for the builder | | [`--all`](#all) | `bool` | | Export all records for the builder |
| `--builder` | `string` | | Override the configured builder instance | | [`--builder`](#builder) | `string` | | Override the configured builder instance |
| `-D`, `--debug` | `bool` | | Enable debug logging | | `-D`, `--debug` | `bool` | | Enable debug logging |
| `-o`, `--output` | `string` | | Output file path | | [`-o`](#o), [`--output`](#output) | `string` | | Output file path |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
@ -23,7 +23,7 @@ Desktop or shared across environments.
## Examples ## Examples
### <a name="export-single-build"></a> Export a single build to a custom file ### <a name="output"></a> Export a single build to a custom file (--output)
```console ```console
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuild docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuild
@ -35,7 +35,7 @@ You can find build IDs by running:
docker buildx history ls docker buildx history ls
``` ```
### <a name="export-multiple-builds"></a> Export multiple builds to individual `.dockerbuild` files ### <a name="o"></a> Export multiple builds to individual `.dockerbuild` files (-o)
To export two builds to separate files: To export two builds to separate files:
@ -54,7 +54,7 @@ docker buildx history export ^1 > mybuild.dockerbuild
docker buildx history export ^2 > backend-build.dockerbuild docker buildx history export ^2 > backend-build.dockerbuild
``` ```
### <a name="export-all-builds"></a> Export all build records to a file ### <a name="all"></a> Export all build records to a file (--all)
Use the `--all` flag and redirect the output: Use the `--all` flag and redirect the output:
@ -67,3 +67,15 @@ Or use the `--output` flag:
```console ```console
docker buildx history export --all -o all-builds.dockerbuild docker buildx history export --all -o all-builds.dockerbuild
``` ```
### <a name="builder"></a> Use a specific builder instance (--builder)
```console
docker buildx history export --builder builder0 ^1 -o builder0-build.dockerbuild
```
### <a name="debug"></a> Enable debug logging (--debug)
```console
docker buildx history export --debug qu2gsuo8ejqrwdfii23xkkckt -o debug-build.dockerbuild
```

View File

@ -9,7 +9,7 @@ Import a build into Docker Desktop
|:----------------|:--------------|:--------|:-----------------------------------------| |:----------------|:--------------|:--------|:-----------------------------------------|
| `--builder` | `string` | | Override the configured builder instance | | `--builder` | `string` | | Override the configured builder instance |
| `-D`, `--debug` | `bool` | | Enable debug logging | | `-D`, `--debug` | `bool` | | Enable debug logging |
| `-f`, `--file` | `stringArray` | | Import from a file path | | [`-f`](#file), [`--file`](#file) | `stringArray` | | Import from a file path |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
@ -22,19 +22,19 @@ pipelines.
## Examples ## Examples
### <a name="import-dockerbuild"></a> Import a `.dockerbuild` archive from standard input ### Import a `.dockerbuild` archive from standard input
```console ```console
docker buildx history import < mybuild.dockerbuild docker buildx history import < mybuild.dockerbuild
``` ```
### <a name="import-build-archive"></a> Import a build archive from a file ### <a name="file"></a> Import a build archive from a file (--file)
```console ```console
docker buildx history import --file ./artifacts/backend-build.dockerbuild docker buildx history import --file ./artifacts/backend-build.dockerbuild
``` ```
### <a name="open-build-manually"></a> Open a build manually ### Open a build manually
By default, the `import` command automatically opens the imported build in Docker By default, the `import` command automatically opens the imported build in Docker
Desktop. You don't need to run `open` unless you're opening a specific build Desktop. You don't need to run `open` unless you're opening a specific build

View File

@ -29,7 +29,7 @@ provenance, SBOMs, or other detailed information.
## Examples ## Examples
### <a name="inspect-most-recent-build"></a> Inspect the most recent build ### Inspect the most recent build
```console ```console
$ docker buildx history inspect $ docker buildx history inspect
@ -59,7 +59,7 @@ DIGEST PLATFORM
sha256:217329d2af959d4f02e3a96dcbe62bf100cab1feb8006a047ddfe51a5397f7e3 https://slsa.dev/provenance/v0.2 sha256:217329d2af959d4f02e3a96dcbe62bf100cab1feb8006a047ddfe51a5397f7e3 https://slsa.dev/provenance/v0.2
``` ```
### <a name="inspect-specific-build"></a> Inspect a specific build ### Inspect a specific build
```console ```console
# Using a build ID # Using a build ID

View File

@ -10,7 +10,7 @@ Inspect a build attachment
| `--builder` | `string` | | Override the configured builder instance | | `--builder` | `string` | | Override the configured builder instance |
| `-D`, `--debug` | `bool` | | Enable debug logging | | `-D`, `--debug` | `bool` | | Enable debug logging |
| `--platform` | `string` | | Platform of attachment | | `--platform` | `string` | | Platform of attachment |
| `--type` | `string` | | Type of attachment | | [`--type`](#type) | `string` | | Type of attachment |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
@ -23,7 +23,7 @@ platform-specific.
## Examples ## Examples
### <a name="inspect-provenance-attachment"></a> Inspect a provenance attachment from a build ### <a name="type"></a> Inspect a provenance attachment from a build (--type)
Supported types include `provenance` and `sbom`. Supported types include `provenance` and `sbom`.
@ -45,7 +45,7 @@ $ docker buildx history inspect attachment qu2gsuo8ejqrwdfii23xkkckt --type prov
} }
``` ```
### <a name="insepct-SBOM"></a> Inspect a SBOM for linux/amd64 ### Inspect a SBOM for linux/amd64
```console ```console
$ docker buildx history inspect attachment ^0 \ $ docker buildx history inspect attachment ^0 \
@ -65,7 +65,7 @@ $ docker buildx history inspect attachment ^0 \
} }
``` ```
### <a name="inspect-attachment-digest"></a> Inspect an attachment by digest ### Inspect an attachment by digest
You can inspect an attachment directly using its digset, which you can get from You can inspect an attachment directly using its digset, which you can get from
the `inspect` output: the `inspect` output:

View File

@ -9,7 +9,7 @@ Print the logs of a build
|:----------------|:---------|:--------|:--------------------------------------------------| |:----------------|:---------|:--------|:--------------------------------------------------|
| `--builder` | `string` | | Override the configured builder instance | | `--builder` | `string` | | Override the configured builder instance |
| `-D`, `--debug` | `bool` | | Enable debug logging | | `-D`, `--debug` | `bool` | | Enable debug logging |
| `--progress` | `string` | `plain` | Set type of progress output (plain, rawjson, tty) | | [`--progress`](#progress) | `string` | `plain` | Set type of progress output (plain, rawjson, tty) |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
@ -28,7 +28,7 @@ You can also specify an earlier build using an offset. For example:
## Examples ## Examples
### <a name="print-logs-recent-build"></a> Print logs for the most recent build ### Print logs for the most recent build
```console ```console
$ docker buildx history logs $ docker buildx history logs
@ -43,7 +43,7 @@ $ docker buildx history logs
By default, this shows logs for the most recent build on the current builder. By default, this shows logs for the most recent build on the current builder.
### <a name="print-logs-specific-build"></a> Print logs for a specific build ### Print logs for a specific build
To print logs for a specific build, use a build ID or offset: To print logs for a specific build, use a build ID or offset:
@ -55,7 +55,7 @@ docker buildx history logs qu2gsuo8ejqrwdfii23xkkckt
docker buildx history logs ^1 docker buildx history logs ^1
``` ```
### <a name="print-logs-json"></a> Print logs in JSON format ### <a name="progress"></a> Set type of progress output (--progress)
```console ```console
$ docker buildx history logs ^1 --progress rawjson $ docker buildx history logs ^1 --progress rawjson

View File

@ -9,10 +9,10 @@ List build records
|:----------------|:--------------|:--------|:---------------------------------------------| |:----------------|:--------------|:--------|:---------------------------------------------|
| `--builder` | `string` | | Override the configured builder instance | | `--builder` | `string` | | Override the configured builder instance |
| `-D`, `--debug` | `bool` | | Enable debug logging | | `-D`, `--debug` | `bool` | | Enable debug logging |
| `--filter` | `stringArray` | | Provide filter values (e.g., `status=error`) | | [`--filter`](#filter) | `stringArray` | | Provide filter values (e.g., `status=error`) |
| `--format` | `string` | `table` | Format the output | | [`--format`](#format) | `string` | `table` | Format the output |
| `--local` | `bool` | | List records for current repository only | | [`--local`](#local) | `bool` | | List records for current repository only |
| `--no-trunc` | `bool` | | Don't truncate output | | [`--no-trunc`](#no-trunc) | `bool` | | Don't truncate output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
@ -27,7 +27,7 @@ results using flags.
## Examples ## Examples
### <a name="list-build-records-current"></a> List all build records for the current builder ### List all build records for the current builder
```console ```console
$ docker buildx history ls $ docker buildx history ls
@ -37,7 +37,7 @@ qsiifiuf1ad9pa9qvppc0z1l3 .dev/2850 Completed 3 days ago 1.3s
g9808bwrjrlkbhdamxklx660b .dev/3120 Completed 5 days ago 2.1s g9808bwrjrlkbhdamxklx660b .dev/3120 Completed 5 days ago 2.1s
``` ```
### <a name="list-failed-builds"></a> List only failed builds ### <a name="filter"></a> List failed builds (--filter)
```console ```console
docker buildx history ls --filter status=error docker buildx history ls --filter status=error
@ -56,19 +56,21 @@ You can combine multiple filters by repeating the `--filter` flag:
docker buildx history ls --filter status=error --filter duration>30s docker buildx history ls --filter status=error --filter duration>30s
``` ```
### <a name="list-builds-current-project"></a> List builds from the current project ### <a name="local"></a> List builds from the current project (--local)
```console ```console
docker buildx history ls --local docker buildx history ls --local
``` ```
### <a name="display-full-output"></a> Display full output without truncation ### <a name="no-trunc"></a> Display full output without truncation (--no-trunc)
```console ```console
docker buildx history ls --no-trunc docker buildx history ls --no-trunc
``` ```
### <a name="list-as-json"></a> Format output as JSON ### <a name="format"></a> Format output (--format)
**JSON output**
```console ```console
$ docker buildx history ls --format json $ docker buildx history ls --format json
@ -90,7 +92,7 @@ $ docker buildx history ls --format json
] ]
``` ```
### <a name="list-go-template"></a> Use a Go template to print name and durations **Go template output**
```console ```console
$ docker buildx history ls --format '{{.Name}} - {{.Duration}}' $ docker buildx history ls --format '{{.Name}} - {{.Duration}}'

View File

@ -20,7 +20,7 @@ Docker Desktop to be installed and running on the host machine.
## Examples ## Examples
### <a name="open-most-recent-build"></a> Open the most recent build in Docker Desktop ### Open the most recent build in Docker Desktop
```console ```console
docker buildx history open docker buildx history open
@ -28,7 +28,7 @@ docker buildx history open
By default, this opens the most recent build on the current builder. By default, this opens the most recent build on the current builder.
### <a name="open-specific-build"></a> Open a specific build ### Open a specific build
```console ```console
# Using a build ID # Using a build ID

View File

@ -22,7 +22,7 @@ the `--all` flag.
## Examples ## Examples
### <a name="remove-specific-build"></a> Remove a specific build ### Remove a specific build
```console ```console
# Using a build ID # Using a build ID
@ -32,7 +32,7 @@ docker buildx history rm qu2gsuo8ejqrwdfii23xkkckt
docker buildx history rm ^1 docker buildx history rm ^1
``` ```
### <a name="remove-multiple-builds"></a> Remove multiple builds ### Remove multiple builds
```console ```console
# Using build IDs # Using build IDs
@ -42,7 +42,7 @@ docker buildx history rm qu2gsuo8ejqrwdfii23xkkckt qsiifiuf1ad9pa9qvppc0z1l3
docker buildx history rm ^1 ^2 docker buildx history rm ^1 ^2
``` ```
### <a name="remove-all-build-records"></a> Remove all build records from the current builder ### Remove all build records from the current builder
```console ```console
docker buildx history rm --all docker buildx history rm --all

View File

@ -7,9 +7,9 @@ Show the OpenTelemetry trace of a build record
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:---------|:--------------|:-----------------------------------------| |:----------------|:---------|:--------------|:-----------------------------------------|
| `--addr` | `string` | `127.0.0.1:0` | Address to bind the UI server | | [`--addr`](#addr) | `string` | `127.0.0.1:0` | Address to bind the UI server |
| `--builder` | `string` | | Override the configured builder instance | | `--builder` | `string` | | Override the configured builder instance |
| `--compare` | `string` | | Compare with another build reference | | [`--compare`](#compare) | `string` | | Compare with another build reference |
| `-D`, `--debug` | `bool` | | Enable debug logging | | `-D`, `--debug` | `bool` | | Enable debug logging |
@ -24,7 +24,7 @@ This helps analyze build performance, step timing, and internal execution flows.
## Examples ## Examples
### <a name="open-opentelemetry-trace"></a> Open the OpenTelemetry trace for the most recent build ### Open the OpenTelemetry trace for the most recent build
This command starts a temporary Jaeger UI server and opens your default browser This command starts a temporary Jaeger UI server and opens your default browser
to view the trace. to view the trace.
@ -33,7 +33,7 @@ to view the trace.
docker buildx history trace docker buildx history trace
``` ```
### <a name="open-trace-specific-build"></a> Open the trace for a specific build ### Open the trace for a specific build
```console ```console
# Using a build ID # Using a build ID
@ -43,7 +43,7 @@ docker buildx history trace qu2gsuo8ejqrwdfii23xkkckt
docker buildx history trace ^1 docker buildx history trace ^1
``` ```
### <a name="run-Jaegar-UI-port"></a> Run the Jaeger UI on a specific port ### <a name="addr"></a> Run the Jaeger UI on a specific port (--addr)
```console ```console
# Using a build ID # Using a build ID
@ -53,7 +53,7 @@ docker buildx history trace qu2gsuo8ejqrwdfii23xkkckt --addr 127.0.0.1:16686
docker buildx history trace ^1 --addr 127.0.0.1:16686 docker buildx history trace ^1 --addr 127.0.0.1:16686
``` ```
### <a name="compare-traces"></a> Compare two build traces ### <a name="compare"></a> Compare two build traces (--compare)
Compare two specific builds by name: Compare two specific builds by name: