Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions commands/history/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ func exportCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {
var options exportOptions

cmd := &cobra.Command{
Use: "export [OPTIONS] [REF]",
Short: "Export a build into Docker Desktop bundle",
Use: "export [OPTIONS] [REF...]",
Short: "Export build records into Docker Desktop bundle",
RunE: func(cmd *cobra.Command, args []string) error {
if options.all && len(args) > 0 {
return errors.New("cannot specify refs when using --all")
Expand Down
4 changes: 2 additions & 2 deletions commands/history/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ func importCmd(dockerCli command.Cli, _ RootOptions) *cobra.Command {
var options importOptions

cmd := &cobra.Command{
Use: "import [OPTIONS] < bundle.dockerbuild",
Short: "Import a build into Docker Desktop",
Use: "import [OPTIONS] -",
Short: "Import build records into Docker Desktop",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
return runImport(cmd.Context(), dockerCli, options)
Expand Down
2 changes: 1 addition & 1 deletion commands/history/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ func inspectCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {

cmd := &cobra.Command{
Use: "inspect [OPTIONS] [REF]",
Short: "Inspect a build",
Short: "Inspect a build record",
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion commands/history/inspect_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func attachmentCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {

cmd := &cobra.Command{
Use: "attachment [OPTIONS] REF [DIGEST]",
Short: "Inspect a build attachment",
Short: "Inspect a build record attachment",
Args: cobra.RangeArgs(1, 2),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion commands/history/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func logsCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {

cmd := &cobra.Command{
Use: "logs [OPTIONS] [REF]",
Short: "Print the logs of a build",
Short: "Print the logs of a build record",
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion commands/history/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func lsCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {
var options lsOptions

cmd := &cobra.Command{
Use: "ls",
Use: "ls [OPTIONS]",
Short: "List build records",
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion commands/history/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func openCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {

cmd := &cobra.Command{
Use: "open [OPTIONS] [REF]",
Short: "Open a build in Docker Desktop",
Short: "Open a build record in Docker Desktop",
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion commands/history/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func traceCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {

flags := cmd.Flags()
flags.StringVar(&options.addr, "addr", "127.0.0.1:0", "Address to bind the UI server")
flags.StringVar(&options.compare, "compare", "", "Compare with another build reference")
flags.StringVar(&options.compare, "compare", "", "Compare with another build record")

return cmd
}
2 changes: 1 addition & 1 deletion commands/imagetools/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func createCmd(dockerCli command.Cli, opts RootOptions) *cobra.Command {
var options createOptions

cmd := &cobra.Command{
Use: "create [OPTIONS] [SOURCE] [SOURCE...]",
Use: "create [OPTIONS] [SOURCE...]",
Short: "Create a new image based on source images",
RunE: func(cmd *cobra.Command, args []string) error {
options.builder = *opts.Builder
Expand Down
2 changes: 1 addition & 1 deletion commands/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func rmCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
var options rmOptions

cmd := &cobra.Command{
Use: "rm [OPTIONS] [NAME] [NAME...]",
Use: "rm [OPTIONS] [NAME...]",
Short: "Remove one or more builder instances",
RunE: func(cmd *cobra.Command, args []string) error {
options.builders = []string{rootOpts.builder}
Expand Down
14 changes: 10 additions & 4 deletions docs/reference/buildx_dial-stdio.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# docker buildx dial-stdio

```text
docker buildx dial-stdio [OPTIONS] < in.fifo > out.fifo &
```

<!---MARKER_GEN_START-->
Proxy current stdio streams to builder instance

Expand All @@ -17,13 +21,15 @@ Proxy current stdio streams to builder instance

## Description

dial-stdio uses the stdin and stdout streams of the command to proxy to the configured builder instance.
It is not intended to be used by humans, but rather by other tools that want to interact with the builder instance via BuildKit API.
dial-stdio uses the stdin and stdout streams of the command to proxy to the
configured builder instance. It is not intended to be used by humans, but
rather by other tools that want to interact with the builder instance via
BuildKit API.

## Examples

Example go program that uses the dial-stdio command wire up a buildkit client.
This is for example use only and may not be suitable for production use.
This is, for example, use only and may not be suitable for production use.

```go
client.New(ctx, "", client.WithContextDialer(func(context.Context, string) (net.Conn, error) {
Expand All @@ -45,4 +51,4 @@ client.New(ctx, "", client.WithContextDialer(func(context.Context, string) (net.

return c2
}))
```
```
2 changes: 1 addition & 1 deletion docs/reference/buildx_du.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# buildx du

```text
docker buildx du
docker buildx du [OPTIONS]
```

<!---MARKER_GEN_START-->
Expand Down
24 changes: 14 additions & 10 deletions docs/reference/buildx_history.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# docker buildx history

```text
docker buildx history [OPTIONS] COMMAND
```

<!---MARKER_GEN_START-->
Commands to work on build records

### Subcommands

| Name | Description |
|:---------------------------------------|:-----------------------------------------------|
| [`export`](buildx_history_export.md) | Export a build into Docker Desktop bundle |
| [`import`](buildx_history_import.md) | Import a build into Docker Desktop |
| [`inspect`](buildx_history_inspect.md) | Inspect a build |
| [`logs`](buildx_history_logs.md) | Print the logs of a build |
| [`ls`](buildx_history_ls.md) | List build records |
| [`open`](buildx_history_open.md) | Open a build in Docker Desktop |
| [`rm`](buildx_history_rm.md) | Remove build records |
| [`trace`](buildx_history_trace.md) | Show the OpenTelemetry trace of a build record |
| Name | Description |
|:---------------------------------------|:------------------------------------------------|
| [`export`](buildx_history_export.md) | Export build records into Docker Desktop bundle |
| [`import`](buildx_history_import.md) | Import build records into Docker Desktop |
| [`inspect`](buildx_history_inspect.md) | Inspect a build record |
| [`logs`](buildx_history_logs.md) | Print the logs of a build record |
| [`ls`](buildx_history_ls.md) | List build records |
| [`open`](buildx_history_open.md) | Open a build record in Docker Desktop |
| [`rm`](buildx_history_rm.md) | Remove build records |
| [`trace`](buildx_history_trace.md) | Show the OpenTelemetry trace of a build record |


### Options
Expand Down
52 changes: 25 additions & 27 deletions docs/reference/buildx_history_export.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker buildx history export

<!---MARKER_GEN_START-->
Export a build into Docker Desktop bundle
Export build records into Docker Desktop bundle

### Options

Expand All @@ -23,59 +23,57 @@ Desktop or shared across environments.

## Examples

### <a name="output"></a> Export a single build to a custom file (--output)
### <a name="all"></a> Export all build records to a file (--all)

Use the `--all` flag and redirect the output:

```console
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuild
docker buildx history export --all > all-builds.dockerbuild
```

You can find build IDs by running:
Or use the `--output` flag:

```console
docker buildx history ls
docker buildx history export --all -o all-builds.dockerbuild
```

### <a name="o"></a> Export multiple builds to individual `.dockerbuild` files (-o)

To export two builds to separate files:
### <a name="builder"></a> Use a specific builder instance (--builder)

```console
# Using build IDs
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt qsiifiuf1ad9pa9qvppc0z1l3 -o multi.dockerbuild

# Or using relative offsets
docker buildx history export ^1 ^2 -o multi.dockerbuild
docker buildx history export --builder builder0 ^1 -o builder0-build.dockerbuild
```

Or use shell redirection:
### <a name="debug"></a> Enable debug logging (--debug)

```console
docker buildx history export ^1 > mybuild.dockerbuild
docker buildx history export ^2 > backend-build.dockerbuild
docker buildx history export --debug qu2gsuo8ejqrwdfii23xkkckt -o debug-build.dockerbuild
```

### <a name="all"></a> Export all build records to a file (--all)

Use the `--all` flag and redirect the output:
### <a name="output"></a> Export a single build to a custom file (--output)

```console
docker buildx history export --all > all-builds.dockerbuild
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuild
```

Or use the `--output` flag:
You can find build IDs by running:

```console
docker buildx history export --all -o all-builds.dockerbuild
docker buildx history ls
```

### <a name="builder"></a> Use a specific builder instance (--builder)
To export two builds to separate files:

```console
docker buildx history export --builder builder0 ^1 -o builder0-build.dockerbuild
# Using build IDs
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt qsiifiuf1ad9pa9qvppc0z1l3 -o multi.dockerbuild

# Or using relative offsets
docker buildx history export ^1 ^2 -o multi.dockerbuild
```

### <a name="debug"></a> Enable debug logging (--debug)
Or use shell redirection:

```console
docker buildx history export --debug qu2gsuo8ejqrwdfii23xkkckt -o debug-build.dockerbuild
```
docker buildx history export ^1 > mybuild.dockerbuild
docker buildx history export ^2 > backend-build.dockerbuild
```
6 changes: 5 additions & 1 deletion docs/reference/buildx_history_import.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# docker buildx history import

```text
docker buildx history import [OPTIONS] -
```

<!---MARKER_GEN_START-->
Import a build into Docker Desktop
Import build records into Docker Desktop

### Options

Expand Down
19 changes: 12 additions & 7 deletions docs/reference/buildx_history_inspect.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# docker buildx history inspect

```text
docker buildx history inspect [OPTIONS] [REF|COMMAND]
```

<!---MARKER_GEN_START-->
Inspect a build
Inspect a build record

### Subcommands

| Name | Description |
|:-----------------------------------------------------|:---------------------------|
| [`attachment`](buildx_history_inspect_attachment.md) | Inspect a build attachment |
| Name | Description |
|:-----------------------------------------------------|:----------------------------------|
| [`attachment`](buildx_history_inspect_attachment.md) | Inspect a build record attachment |


### Options
Expand Down Expand Up @@ -74,7 +78,7 @@ docker buildx history inspect ^1
The formatting options (`--format`) pretty-prints the output to `pretty` (default),
`json` or using a Go template.

**Pretty output**
#### Pretty output

```console
$ docker buildx history inspect
Expand Down Expand Up @@ -105,7 +109,8 @@ sha256:217329d2af959d4f02e3a96dcbe62bf100cab1feb8006a047ddfe51a5397f7e3

Print build logs: docker buildx history logs g9808bwrjrlkbhdamxklx660b
```
**JSON output**

#### JSON output

```console
$ docker buildx history inspect --format json
Expand Down Expand Up @@ -160,7 +165,7 @@ $ docker buildx history inspect --format json
}
```

**Go template output**
#### Go template output

```console
$ docker buildx history inspect --format "{{.Name}}: {{.VCSRepository}} ({{.VCSRevision}})"
Expand Down
6 changes: 5 additions & 1 deletion docs/reference/buildx_history_inspect_attachment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# docker buildx history inspect attachment

```text
docker buildx history inspect attachment [OPTIONS] REF [DIGEST]
```

<!---MARKER_GEN_START-->
Inspect a build attachment
Inspect a build record attachment

### Options

Expand Down
6 changes: 5 additions & 1 deletion docs/reference/buildx_history_logs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# docker buildx history logs

```text
docker buildx history logs [OPTIONS] [REF]
```

<!---MARKER_GEN_START-->
Print the logs of a build
Print the logs of a build record

### Options

Expand Down
16 changes: 10 additions & 6 deletions docs/reference/buildx_history_ls.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# docker buildx history ls

```text
docker buildx history ls [OPTIONS]
```

<!---MARKER_GEN_START-->
List build records

Expand Down Expand Up @@ -45,10 +49,10 @@ docker buildx history ls --filter status=error

You can filter the list using the `--filter` flag. Supported filters include:

| Filter | Supported comparisons | Example |
|:-------|:----------------------|:--------|
| `ref`, `repository`, `status` | Support `=` and `!=` comparisons | `--filter status!=success` |
| `startedAt`, `completedAt`, `duration` | Support `<` and `>` comparisons with time values | `--filter duration>30s` |
| Filter | Supported comparisons | Example |
|:---------------------------------------|:-------------------------------------------------|:---------------------------|
| `ref`, `repository`, `status` | Support `=` and `!=` comparisons | `--filter status!=success` |
| `startedAt`, `completedAt`, `duration` | Support `<` and `>` comparisons with time values | `--filter duration>30s` |

You can combine multiple filters by repeating the `--filter` flag:

Expand All @@ -70,7 +74,7 @@ docker buildx history ls --no-trunc

### <a name="format"></a> Format output (--format)

**JSON output**
#### JSON output

```console
$ docker buildx history ls --format json
Expand All @@ -92,7 +96,7 @@ $ docker buildx history ls --format json
]
```

**Go template output**
#### Go template output

```console
$ docker buildx history ls --format '{{.Name}} - {{.Duration}}'
Expand Down
Loading