history: copy update

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-05-13 12:20:00 +02:00
parent 9e17bc7a4c
commit 72fde4c53a
28 changed files with 127 additions and 86 deletions
+2 -2
View File
@@ -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")
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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}
+10 -4
View File
@@ -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
@@ -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) {
@@ -45,4 +51,4 @@ client.New(ctx, "", client.WithContextDialer(func(context.Context, string) (net.
return c2
}))
```
```
+1 -1
View File
@@ -1,7 +1,7 @@
# buildx du
```text
docker buildx du
docker buildx du [OPTIONS]
```
<!---MARKER_GEN_START-->
+14 -10
View File
@@ -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
+31 -33
View File
@@ -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
@@ -23,37 +23,6 @@ Desktop or shared across environments.
## Examples
### <a name="output"></a> Export a single build to a custom file (--output)
```console
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuild
```
You can find build IDs by running:
```console
docker buildx history ls
```
### <a name="o"></a> Export multiple builds to individual `.dockerbuild` files (-o)
To export two builds to separate files:
```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
```
Or use shell redirection:
```console
docker buildx history export ^1 > mybuild.dockerbuild
docker buildx history export ^2 > backend-build.dockerbuild
```
### <a name="all"></a> Export all build records to a file (--all)
Use the `--all` flag and redirect the output:
@@ -78,4 +47,33 @@ docker buildx history export --builder builder0 ^1 -o builder0-build.dockerbuild
```console
docker buildx history export --debug qu2gsuo8ejqrwdfii23xkkckt -o debug-build.dockerbuild
```
```
### <a name="output"></a> Export a single build to a custom file (--output)
```console
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuild
```
You can find build IDs by running:
```console
docker buildx history ls
```
To export two builds to separate files:
```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
```
Or use shell redirection:
```console
docker buildx history export ^1 > mybuild.dockerbuild
docker buildx history export ^2 > backend-build.dockerbuild
```
+5 -1
View File
@@ -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
+12 -7
View File
@@ -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
@@ -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
@@ -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
@@ -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}})"
@@ -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
+5 -1
View File
@@ -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
+10 -6
View File
@@ -1,5 +1,9 @@
# docker buildx history ls
```text
docker buildx history ls [OPTIONS]
```
<!---MARKER_GEN_START-->
List build records
@@ -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:
@@ -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
@@ -92,7 +96,7 @@ $ docker buildx history ls --format json
]
```
**Go template output**
#### Go template output
```console
$ docker buildx history ls --format '{{.Name}} - {{.Duration}}'
+5 -1
View File
@@ -1,7 +1,11 @@
# docker buildx history open
```text
docker buildx history open [OPTIONS] [REF]
```
<!---MARKER_GEN_START-->
Open a build in Docker Desktop
Open a build record in Docker Desktop
### Options
+6 -2
View File
@@ -1,5 +1,9 @@
# docker buildx history rm
```text
docker buildx history rm [OPTIONS] [REF...]
```
<!---MARKER_GEN_START-->
Remove build records
@@ -7,7 +11,7 @@ Remove build records
| Name | Type | Default | Description |
|:----------------|:---------|:--------|:-----------------------------------------|
| `--all` | `bool` | | Remove all build records |
| [`--all`](#all) | `bool` | | Remove all build records |
| `--builder` | `string` | | Override the configured builder instance |
| `-D`, `--debug` | `bool` | | Enable debug logging |
@@ -42,7 +46,7 @@ docker buildx history rm qu2gsuo8ejqrwdfii23xkkckt qsiifiuf1ad9pa9qvppc0z1l3
docker buildx history rm ^1 ^2
```
### Remove all build records from the current builder
### <a name="all"></a> Remove all build records from the current builder (--all)
```console
docker buildx history rm --all
+5 -1
View File
@@ -1,5 +1,9 @@
# docker buildx history trace
```text
docker buildx history trace [OPTIONS] [REF]
```
<!---MARKER_GEN_START-->
Show the OpenTelemetry trace of a build record
@@ -9,7 +13,7 @@ Show the OpenTelemetry trace of a build record
|:------------------------|:---------|:--------------|:-----------------------------------------|
| [`--addr`](#addr) | `string` | `127.0.0.1:0` | Address to bind the UI server |
| `--builder` | `string` | | Override the configured builder instance |
| [`--compare`](#compare) | `string` | | Compare with another build reference |
| [`--compare`](#compare) | `string` | | Compare with another build record |
| `-D`, `--debug` | `bool` | | Enable debug logging |
+1 -1
View File
@@ -1,7 +1,7 @@
# buildx imagetools create
```text
docker buildx imagetools create [OPTIONS] [SOURCE] [SOURCE...]
docker buildx imagetools create [OPTIONS] [SOURCE...]
```
<!---MARKER_GEN_START-->
+1 -1
View File
@@ -1,7 +1,7 @@
# buildx ls
```text
docker buildx ls
docker buildx ls [OPTIONS]
```
<!---MARKER_GEN_START-->
+1 -1
View File
@@ -1,7 +1,7 @@
# buildx prune
```text
docker buildx prune
docker buildx prune [OPTIONS]
```
<!---MARKER_GEN_START-->
+1 -1
View File
@@ -1,7 +1,7 @@
# buildx rm
```text
docker buildx rm [OPTIONS] [NAME] [NAME...]
docker buildx rm [OPTIONS] [NAME...]
```
<!---MARKER_GEN_START-->
+1 -1
View File
@@ -1,6 +1,6 @@
# buildx stop
```
```text
docker buildx stop [NAME]
```
+1 -1
View File
@@ -1,6 +1,6 @@
# buildx use
```
```text
docker buildx use [OPTIONS] NAME
```