mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	docs: update cli-docs-tool to v0.4.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
		@@ -29,9 +29,9 @@ Extended build capabilities with BuildKit
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,18 +13,18 @@ Build from a file
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| [`-f`](#file), [`--file stringArray`](#file) | Build definition file |
 | 
					| [`-f`](#file), [`--file`](#file) | `stringArray` |  | Build definition file |
 | 
				
			||||||
| `--load` | Shorthand for `--set=*.output=type=docker` |
 | 
					| `--load` |  |  | Shorthand for `--set=*.output=type=docker` |
 | 
				
			||||||
| `--metadata-file string` | Write build result metadata to the file |
 | 
					| `--metadata-file` | `string` |  | Write build result metadata to the file |
 | 
				
			||||||
| [`--no-cache`](#no-cache) | Do not use cache when building the image |
 | 
					| [`--no-cache`](#no-cache) |  |  | Do not use cache when building the image |
 | 
				
			||||||
| [`--print`](#print) | Print the options without building |
 | 
					| [`--print`](#print) |  |  | Print the options without building |
 | 
				
			||||||
| [`--progress string`](#progress) | 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`). Use plain to show container output |
 | 
				
			||||||
| [`--pull`](#pull) | Always attempt to pull a newer version of the image |
 | 
					| [`--pull`](#pull) |  |  | Always attempt to pull a newer version of the image |
 | 
				
			||||||
| `--push` | Shorthand for `--set=*.output=type=registry` |
 | 
					| `--push` |  |  | Shorthand for `--set=*.output=type=registry` |
 | 
				
			||||||
| [`--set stringArray`](#set) | Override target value (e.g., `targetpattern.key=value`) |
 | 
					| [`--set`](#set) | `stringArray` |  | Override target value (e.g., `targetpattern.key=value`) |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,36 +13,36 @@ Start a build
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--add-host stringSlice`](https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host) | Add a custom host-to-IP mapping (format: `host:ip`) |
 | 
					| [`--add-host`](https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host) | `stringSlice` |  | Add a custom host-to-IP mapping (format: `host:ip`) |
 | 
				
			||||||
| [`--allow stringSlice`](#allow) | Allow extra privileged entitlement (e.g., `network.host`, `security.insecure`) |
 | 
					| [`--allow`](#allow) | `stringSlice` |  | Allow extra privileged entitlement (e.g., `network.host`, `security.insecure`) |
 | 
				
			||||||
| [`--build-arg stringArray`](#build-arg) | Set build-time variables |
 | 
					| [`--build-arg`](#build-arg) | `stringArray` |  | Set build-time variables |
 | 
				
			||||||
| [`--build-context stringArray`](#build-context) | Additional build contexts (e.g., name=path) |
 | 
					| [`--build-context`](#build-context) | `stringArray` |  | Additional build contexts (e.g., name=path) |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| [`--cache-from stringArray`](#cache-from) | External cache sources (e.g., `user/app:cache`, `type=local,src=path/to/dir`) |
 | 
					| [`--cache-from`](#cache-from) | `stringArray` |  | External cache sources (e.g., `user/app:cache`, `type=local,src=path/to/dir`) |
 | 
				
			||||||
| [`--cache-to stringArray`](#cache-to) | Cache export destinations (e.g., `user/app:cache`, `type=local,dest=path/to/dir`) |
 | 
					| [`--cache-to`](#cache-to) | `stringArray` |  | Cache export destinations (e.g., `user/app:cache`, `type=local,dest=path/to/dir`) |
 | 
				
			||||||
| [`--cgroup-parent string`](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) | Optional parent cgroup for the container |
 | 
					| [`--cgroup-parent`](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) | `string` |  | Optional parent cgroup for the container |
 | 
				
			||||||
| [`-f`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f), [`--file string`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f) | Name of the Dockerfile (default: `PATH/Dockerfile`) |
 | 
					| [`-f`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f), [`--file`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f) | `string` |  | Name of the Dockerfile (default: `PATH/Dockerfile`) |
 | 
				
			||||||
| `--iidfile string` | Write the image ID to the file |
 | 
					| `--iidfile` | `string` |  | Write the image ID to the file |
 | 
				
			||||||
| `--label stringArray` | Set metadata for an image |
 | 
					| `--label` | `stringArray` |  | Set metadata for an image |
 | 
				
			||||||
| [`--load`](#load) | Shorthand for `--output=type=docker` |
 | 
					| [`--load`](#load) |  |  | Shorthand for `--output=type=docker` |
 | 
				
			||||||
| [`--metadata-file string`](#metadata-file) | Write build result metadata to the file |
 | 
					| [`--metadata-file`](#metadata-file) | `string` |  | Write build result metadata to the file |
 | 
				
			||||||
| `--network string` | Set the networking mode for the `RUN` instructions during build |
 | 
					| `--network` | `string` | `default` | Set the networking mode for the `RUN` instructions during build |
 | 
				
			||||||
| `--no-cache` | Do not use cache when building the image |
 | 
					| `--no-cache` |  |  | Do not use cache when building the image |
 | 
				
			||||||
| `--no-cache-filter stringArray` | Do not cache specified stages |
 | 
					| `--no-cache-filter` | `stringArray` |  | Do not cache specified stages |
 | 
				
			||||||
| [`-o`](#output), [`--output stringArray`](#output) | Output destination (format: `type=local,dest=path`) |
 | 
					| [`-o`](#output), [`--output`](#output) | `stringArray` |  | Output destination (format: `type=local,dest=path`) |
 | 
				
			||||||
| [`--platform stringArray`](#platform) | Set target platform for build |
 | 
					| [`--platform`](#platform) | `stringArray` |  | Set target platform for build |
 | 
				
			||||||
| [`--progress string`](#progress) | 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`). Use plain to show container output |
 | 
				
			||||||
| `--pull` | Always attempt to pull a newer version of the image |
 | 
					| `--pull` |  |  | Always attempt to pull a newer version of the image |
 | 
				
			||||||
| [`--push`](#push) | Shorthand for `--output=type=registry` |
 | 
					| [`--push`](#push) |  |  | Shorthand for `--output=type=registry` |
 | 
				
			||||||
| `-q`, `--quiet` | Suppress the build output and print image ID on success |
 | 
					| `-q`, `--quiet` |  |  | Suppress the build output and print image ID on success |
 | 
				
			||||||
| [`--secret stringArray`](#secret) | Secret to expose to the build (format: `id=mysecret[,src=/local/secret]`) |
 | 
					| [`--secret`](#secret) | `stringArray` |  | Secret to expose to the build (format: `id=mysecret[,src=/local/secret]`) |
 | 
				
			||||||
| [`--shm-size bytes`](#shm-size) | Size of `/dev/shm` |
 | 
					| [`--shm-size`](#shm-size) | `bytes` | `0` | Size of `/dev/shm` |
 | 
				
			||||||
| [`--ssh stringArray`](#ssh) | SSH agent socket or keys to expose to the build (format: `default\|<id>[=<socket>\|<key>[,<key>]]`) |
 | 
					| [`--ssh`](#ssh) | `stringArray` |  | SSH agent socket or keys to expose to the build (format: `default\|<id>[=<socket>\|<key>[,<key>]]`) |
 | 
				
			||||||
| [`-t`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t), [`--tag stringArray`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t) | Name and optionally a tag (format: `name:tag`) |
 | 
					| [`-t`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t), [`--tag`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t) | `stringArray` |  | Name and optionally a tag (format: `name:tag`) |
 | 
				
			||||||
| [`--target string`](https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target) | Set the target build stage to build |
 | 
					| [`--target`](https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target) | `string` |  | Set the target build stage to build |
 | 
				
			||||||
| [`--ulimit ulimit`](#ulimit) | Ulimit options |
 | 
					| [`--ulimit`](#ulimit) | `ulimit` |  | Ulimit options |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,19 +9,19 @@ Create a new builder instance
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--append`](#append) | Append a node to builder instead of changing it |
 | 
					| [`--append`](#append) |  |  | Append a node to builder instead of changing it |
 | 
				
			||||||
| `--bootstrap` | Boot builder after creation |
 | 
					| `--bootstrap` |  |  | Boot builder after creation |
 | 
				
			||||||
| [`--buildkitd-flags string`](#buildkitd-flags) | Flags for buildkitd daemon |
 | 
					| [`--buildkitd-flags`](#buildkitd-flags) | `string` |  | Flags for buildkitd daemon |
 | 
				
			||||||
| [`--config string`](#config) | BuildKit config file |
 | 
					| [`--config`](#config) | `string` |  | BuildKit config file |
 | 
				
			||||||
| [`--driver string`](#driver) | Driver to use (available: `docker`, `docker-container`, `kubernetes`) |
 | 
					| [`--driver`](#driver) | `string` |  | Driver to use (available: `docker`, `docker-container`, `kubernetes`) |
 | 
				
			||||||
| [`--driver-opt stringArray`](#driver-opt) | Options for the driver |
 | 
					| [`--driver-opt`](#driver-opt) | `stringArray` |  | Options for the driver |
 | 
				
			||||||
| [`--leave`](#leave) | Remove a node from builder instead of changing it |
 | 
					| [`--leave`](#leave) |  |  | Remove a node from builder instead of changing it |
 | 
				
			||||||
| [`--name string`](#name) | Builder instance name |
 | 
					| [`--name`](#name) | `string` |  | Builder instance name |
 | 
				
			||||||
| [`--node string`](#node) | Create/modify node with given name |
 | 
					| [`--node`](#node) | `string` |  | Create/modify node with given name |
 | 
				
			||||||
| [`--platform stringArray`](#platform) | Fixed platforms for current node |
 | 
					| [`--platform`](#platform) | `stringArray` |  | Fixed platforms for current node |
 | 
				
			||||||
| [`--use`](#use) | Set the current builder instance |
 | 
					| [`--use`](#use) |  |  | Set the current builder instance |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,11 +9,11 @@ Disk usage
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| `--filter filter` | Provide filter values |
 | 
					| `--filter` | `filter` |  | Provide filter values |
 | 
				
			||||||
| `--verbose` | Provide a more verbose output |
 | 
					| `--verbose` |  |  | Provide a more verbose output |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,9 +17,9 @@ Commands to work on images in registry
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,13 +9,13 @@ Create a new image based on source images
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--append`](#append) | Append to existing manifest |
 | 
					| [`--append`](#append) |  |  | Append to existing manifest |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| [`--dry-run`](#dry-run) | Show final image instead of pushing |
 | 
					| [`--dry-run`](#dry-run) |  |  | Show final image instead of pushing |
 | 
				
			||||||
| [`-f`](#file), [`--file stringArray`](#file) | Read source descriptor from file |
 | 
					| [`-f`](#file), [`--file`](#file) | `stringArray` |  | Read source descriptor from file |
 | 
				
			||||||
| [`-t`](#tag), [`--tag stringArray`](#tag) | Set reference for new image |
 | 
					| [`-t`](#tag), [`--tag`](#tag) | `stringArray` |  | Set reference for new image |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,10 +9,10 @@ Show details of image in the registry
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| [`--raw`](#raw) | Show original JSON manifest |
 | 
					| [`--raw`](#raw) |  |  | Show original JSON manifest |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,10 +9,10 @@ Inspect current builder instance
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--bootstrap`](#bootstrap) | Ensure builder has booted before inspecting |
 | 
					| [`--bootstrap`](#bootstrap) |  |  | Ensure builder has booted before inspecting |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,14 +9,14 @@ Remove build cache
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| `-a`, `--all` | Remove all unused images, not just dangling ones |
 | 
					| `-a`, `--all` |  |  | Remove all unused images, not just dangling ones |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| `--filter filter` | Provide filter values (e.g., `until=24h`) |
 | 
					| `--filter` | `filter` |  | Provide filter values (e.g., `until=24h`) |
 | 
				
			||||||
| `-f`, `--force` | Do not prompt for confirmation |
 | 
					| `-f`, `--force` |  |  | Do not prompt for confirmation |
 | 
				
			||||||
| `--keep-storage bytes` | Amount of disk space to keep for cache |
 | 
					| `--keep-storage` | `bytes` | `0` | Amount of disk space to keep for cache |
 | 
				
			||||||
| `--verbose` | Provide a more verbose output |
 | 
					| `--verbose` |  |  | Provide a more verbose output |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,13 +9,13 @@ Remove a builder instance
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--all-inactive`](#all-inactive) | Remove all inactive builders |
 | 
					| [`--all-inactive`](#all-inactive) |  |  | Remove all inactive builders |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| [`-f`](#force), [`--force`](#force) | Do not prompt for confirmation |
 | 
					| [`-f`](#force), [`--force`](#force) |  |  | Do not prompt for confirmation |
 | 
				
			||||||
| [`--keep-daemon`](#keep-daemon) | Keep the buildkitd daemon running |
 | 
					| [`--keep-daemon`](#keep-daemon) |  |  | Keep the buildkitd daemon running |
 | 
				
			||||||
| [`--keep-state`](#keep-state) | Keep BuildKit state |
 | 
					| [`--keep-state`](#keep-state) |  |  | Keep BuildKit state |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,9 +9,9 @@ Stop builder instance
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,11 +9,11 @@ Set the current builder instance
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Name | Description |
 | 
					| Name | Type | Default | Description |
 | 
				
			||||||
| --- | --- |
 | 
					| --- | --- | --- | --- |
 | 
				
			||||||
| [`--builder string`](#builder) | Override the configured builder instance |
 | 
					| [`--builder`](#builder) | `string` |  | Override the configured builder instance |
 | 
				
			||||||
| `--default` | Set builder as default for current context |
 | 
					| `--default` |  |  | Set builder as default for current context |
 | 
				
			||||||
| `--global` | Builder persists context changes |
 | 
					| `--global` |  |  | Builder persists context changes |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!---MARKER_GEN_END-->
 | 
					<!---MARKER_GEN_END-->
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@@ -12,7 +12,7 @@ require (
 | 
				
			|||||||
	github.com/containerd/console v1.0.3
 | 
						github.com/containerd/console v1.0.3
 | 
				
			||||||
	github.com/containerd/containerd v1.6.0
 | 
						github.com/containerd/containerd v1.6.0
 | 
				
			||||||
	github.com/docker/cli v20.10.12+incompatible
 | 
						github.com/docker/cli v20.10.12+incompatible
 | 
				
			||||||
	github.com/docker/cli-docs-tool v0.3.0
 | 
						github.com/docker/cli-docs-tool v0.4.0
 | 
				
			||||||
	github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496 // indirect
 | 
						github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496 // indirect
 | 
				
			||||||
	github.com/docker/distribution v2.8.0+incompatible
 | 
						github.com/docker/distribution v2.8.0+incompatible
 | 
				
			||||||
	github.com/docker/docker v20.10.7+incompatible
 | 
						github.com/docker/docker v20.10.7+incompatible
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
									
									
									
									
								
							@@ -445,8 +445,8 @@ github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e/go.mo
 | 
				
			|||||||
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
 | 
					github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
 | 
				
			||||||
github.com/docker/cli v20.10.3-0.20210702143511-f782d1355eff+incompatible h1:CaaxCD/l9Dxogu6lxf7AQautlv3sHULrasPadayp0fM=
 | 
					github.com/docker/cli v20.10.3-0.20210702143511-f782d1355eff+incompatible h1:CaaxCD/l9Dxogu6lxf7AQautlv3sHULrasPadayp0fM=
 | 
				
			||||||
github.com/docker/cli v20.10.3-0.20210702143511-f782d1355eff+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
 | 
					github.com/docker/cli v20.10.3-0.20210702143511-f782d1355eff+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
 | 
				
			||||||
github.com/docker/cli-docs-tool v0.3.0 h1:GFp265P7r0k59EmjD3r066iqN1y4L5qlKsBeODJYGXo=
 | 
					github.com/docker/cli-docs-tool v0.4.0 h1:MdfKoErGEbFqIxQ8an9BsZ+YzKUGd58RBVkV+Q82GPo=
 | 
				
			||||||
github.com/docker/cli-docs-tool v0.3.0/go.mod h1:rgW5KKdNpLMBIuH4WQ/1RNh38nH+/Ay5jgL4P0ZMPpY=
 | 
					github.com/docker/cli-docs-tool v0.4.0/go.mod h1:rgW5KKdNpLMBIuH4WQ/1RNh38nH+/Ay5jgL4P0ZMPpY=
 | 
				
			||||||
github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496 h1:90ytrX1dbzL7Uf/hHiuWwvywC+gikHv4hkAy4CwRTbs=
 | 
					github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496 h1:90ytrX1dbzL7Uf/hHiuWwvywC+gikHv4hkAy4CwRTbs=
 | 
				
			||||||
github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496/go.mod h1:iT2pYfi580XlpaV4KmK0T6+4/9+XoKmk/fhoDod1emE=
 | 
					github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496/go.mod h1:iT2pYfi580XlpaV4KmK0T6+4/9+XoKmk/fhoDod1emE=
 | 
				
			||||||
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
 | 
					github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								vendor/github.com/docker/cli-docs-tool/annotation/annotation.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/docker/cli-docs-tool/annotation/annotation.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -20,4 +20,6 @@ const (
 | 
				
			|||||||
	// CodeDelimiter specifies the char that will be converted as code backtick.
 | 
						// CodeDelimiter specifies the char that will be converted as code backtick.
 | 
				
			||||||
	// Can be used on cmd for inheritance or a specific flag.
 | 
						// Can be used on cmd for inheritance or a specific flag.
 | 
				
			||||||
	CodeDelimiter = "docs.code-delimiter"
 | 
						CodeDelimiter = "docs.code-delimiter"
 | 
				
			||||||
 | 
						// DefaultValue specifies the default value for a flag.
 | 
				
			||||||
 | 
						DefaultValue = "docs.default-value"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										37
									
								
								vendor/github.com/docker/cli-docs-tool/clidocstool_md.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								vendor/github.com/docker/cli-docs-tool/clidocstool_md.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -17,7 +17,6 @@ package clidocstool
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"bytes"
 | 
						"bytes"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"io/ioutil"
 | 
					 | 
				
			||||||
	"log"
 | 
						"log"
 | 
				
			||||||
	"os"
 | 
						"os"
 | 
				
			||||||
	"path/filepath"
 | 
						"path/filepath"
 | 
				
			||||||
@@ -82,14 +81,14 @@ func (c *Client) GenMarkdownTree(cmd *cobra.Command) error {
 | 
				
			|||||||
		}); err != nil {
 | 
							}); err != nil {
 | 
				
			||||||
			return err
 | 
								return err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if err = ioutil.WriteFile(targetPath, icBuf.Bytes(), 0644); err != nil {
 | 
							if err = os.WriteFile(targetPath, icBuf.Bytes(), 0644); err != nil {
 | 
				
			||||||
			return err
 | 
								return err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else if err := copyFile(sourcePath, targetPath); err != nil {
 | 
						} else if err := copyFile(sourcePath, targetPath); err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	content, err := ioutil.ReadFile(targetPath)
 | 
						content, err := os.ReadFile(targetPath)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -116,7 +115,7 @@ func (c *Client) GenMarkdownTree(cmd *cobra.Command) error {
 | 
				
			|||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if err = ioutil.WriteFile(targetPath, []byte(cont), fi.Mode()); err != nil {
 | 
						if err = os.WriteFile(targetPath, []byte(cont), fi.Mode()); err != nil {
 | 
				
			||||||
		return fmt.Errorf("failed to write %s: %w", targetPath, err)
 | 
							return fmt.Errorf("failed to write %s: %w", targetPath, err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -179,8 +178,8 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if cmd.Flags().HasAvailableFlags() {
 | 
						if cmd.Flags().HasAvailableFlags() {
 | 
				
			||||||
		fmt.Fprint(b, "### Options\n\n")
 | 
							fmt.Fprint(b, "### Options\n\n")
 | 
				
			||||||
		fmt.Fprint(b, "| Name | Description |\n")
 | 
							fmt.Fprint(b, "| Name | Type | Default | Description |\n")
 | 
				
			||||||
		fmt.Fprint(b, "| --- | --- |\n")
 | 
							fmt.Fprint(b, "| --- | --- | --- | --- |\n")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		cmd.Flags().VisitAll(func(f *pflag.Flag) {
 | 
							cmd.Flags().VisitAll(func(f *pflag.Flag) {
 | 
				
			||||||
			if f.Hidden {
 | 
								if f.Hidden {
 | 
				
			||||||
@@ -193,19 +192,33 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) {
 | 
				
			|||||||
				name = mdMakeLink(name, f.Name, f, isLink)
 | 
									name = mdMakeLink(name, f.Name, f, isLink)
 | 
				
			||||||
				fmt.Fprintf(b, "%s, ", name)
 | 
									fmt.Fprintf(b, "%s, ", name)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			name := "`--" + f.Name
 | 
								name := "`--" + f.Name + "`"
 | 
				
			||||||
			if f.Value.Type() != "bool" {
 | 
					 | 
				
			||||||
				name += " " + f.Value.Type()
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			name += "`"
 | 
					 | 
				
			||||||
			name = mdMakeLink(name, f.Name, f, isLink)
 | 
								name = mdMakeLink(name, f.Name, f, isLink)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								var ftype string
 | 
				
			||||||
 | 
								if f.Value.Type() != "bool" {
 | 
				
			||||||
 | 
									ftype = "`" + f.Value.Type() + "`"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								var defval string
 | 
				
			||||||
 | 
								if v, ok := f.Annotations[annotation.DefaultValue]; ok && len(v) > 0 {
 | 
				
			||||||
 | 
									defval = v[0]
 | 
				
			||||||
 | 
									if cd, ok := f.Annotations[annotation.CodeDelimiter]; ok {
 | 
				
			||||||
 | 
										defval = strings.ReplaceAll(defval, cd[0], "`")
 | 
				
			||||||
 | 
									} else if cd, ok := cmd.Annotations[annotation.CodeDelimiter]; ok {
 | 
				
			||||||
 | 
										defval = strings.ReplaceAll(defval, cd, "`")
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								} else if f.DefValue != "" && (f.Value.Type() != "bool" && f.DefValue != "true") && f.DefValue != "[]" {
 | 
				
			||||||
 | 
									defval = "`" + f.DefValue + "`"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			usage := f.Usage
 | 
								usage := f.Usage
 | 
				
			||||||
			if cd, ok := f.Annotations[annotation.CodeDelimiter]; ok {
 | 
								if cd, ok := f.Annotations[annotation.CodeDelimiter]; ok {
 | 
				
			||||||
				usage = strings.ReplaceAll(usage, cd[0], "`")
 | 
									usage = strings.ReplaceAll(usage, cd[0], "`")
 | 
				
			||||||
			} else if cd, ok := cmd.Annotations[annotation.CodeDelimiter]; ok {
 | 
								} else if cd, ok := cmd.Annotations[annotation.CodeDelimiter]; ok {
 | 
				
			||||||
				usage = strings.ReplaceAll(usage, cd, "`")
 | 
									usage = strings.ReplaceAll(usage, cd, "`")
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			fmt.Fprintf(b, "%s | %s |\n", mdEscapePipe(name), mdEscapePipe(usage))
 | 
								fmt.Fprintf(b, "%s | %s | %s | %s |\n", mdEscapePipe(name), mdEscapePipe(ftype), mdEscapePipe(defval), mdEscapePipe(usage))
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		fmt.Fprintln(b, "")
 | 
							fmt.Fprintln(b, "")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										27
									
								
								vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -17,7 +17,6 @@ package clidocstool
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"io"
 | 
						"io"
 | 
				
			||||||
	"io/ioutil"
 | 
					 | 
				
			||||||
	"log"
 | 
						"log"
 | 
				
			||||||
	"os"
 | 
						"os"
 | 
				
			||||||
	"path/filepath"
 | 
						"path/filepath"
 | 
				
			||||||
@@ -269,13 +268,25 @@ func genFlagResult(cmd *cobra.Command, flags *pflag.FlagSet, anchors map[string]
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	flags.VisitAll(func(flag *pflag.Flag) {
 | 
						flags.VisitAll(func(flag *pflag.Flag) {
 | 
				
			||||||
		opt = cmdOption{
 | 
							opt = cmdOption{
 | 
				
			||||||
			Option:       flag.Name,
 | 
								Option:     flag.Name,
 | 
				
			||||||
			ValueType:    flag.Value.Type(),
 | 
								ValueType:  flag.Value.Type(),
 | 
				
			||||||
			DefaultValue: forceMultiLine(flag.DefValue, defaultValueMaxWidth),
 | 
								Deprecated: len(flag.Deprecated) > 0,
 | 
				
			||||||
			Deprecated:   len(flag.Deprecated) > 0,
 | 
								Hidden:     flag.Hidden,
 | 
				
			||||||
			Hidden:       flag.Hidden,
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							var defval string
 | 
				
			||||||
 | 
							if v, ok := flag.Annotations[annotation.DefaultValue]; ok && len(v) > 0 {
 | 
				
			||||||
 | 
								defval = v[0]
 | 
				
			||||||
 | 
								if cd, ok := flag.Annotations[annotation.CodeDelimiter]; ok {
 | 
				
			||||||
 | 
									defval = strings.ReplaceAll(defval, cd[0], "`")
 | 
				
			||||||
 | 
								} else if cd, ok := cmd.Annotations[annotation.CodeDelimiter]; ok {
 | 
				
			||||||
 | 
									defval = strings.ReplaceAll(defval, cd, "`")
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								defval = flag.DefValue
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							opt.DefaultValue = forceMultiLine(defval, defaultValueMaxWidth)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usage := flag.Usage
 | 
							usage := flag.Usage
 | 
				
			||||||
		if cd, ok := flag.Annotations[annotation.CodeDelimiter]; ok {
 | 
							if cd, ok := flag.Annotations[annotation.CodeDelimiter]; ok {
 | 
				
			||||||
			usage = strings.ReplaceAll(usage, cd[0], "`")
 | 
								usage = strings.ReplaceAll(usage, cd[0], "`")
 | 
				
			||||||
@@ -367,7 +378,7 @@ func (c *Client) loadLongDescription(parentCmd *cobra.Command) error {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		name := cmd.CommandPath()
 | 
							name := cmd.CommandPath()
 | 
				
			||||||
		if i := strings.Index(name, " "); c.plugin && i >= 0 {
 | 
							if i := strings.Index(name, " "); i >= 0 {
 | 
				
			||||||
			// remove root command / binary name
 | 
								// remove root command / binary name
 | 
				
			||||||
			name = name[i+1:]
 | 
								name = name[i+1:]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -376,7 +387,7 @@ func (c *Client) loadLongDescription(parentCmd *cobra.Command) error {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		mdFile := strings.ReplaceAll(name, " ", "_") + ".md"
 | 
							mdFile := strings.ReplaceAll(name, " ", "_") + ".md"
 | 
				
			||||||
		sourcePath := filepath.Join(c.source, mdFile)
 | 
							sourcePath := filepath.Join(c.source, mdFile)
 | 
				
			||||||
		content, err := ioutil.ReadFile(sourcePath)
 | 
							content, err := os.ReadFile(sourcePath)
 | 
				
			||||||
		if os.IsNotExist(err) {
 | 
							if os.IsNotExist(err) {
 | 
				
			||||||
			log.Printf("WARN: %s does not exist, skipping Markdown examples for YAML doc\n", mdFile)
 | 
								log.Printf("WARN: %s does not exist, skipping Markdown examples for YAML doc\n", mdFile)
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							@@ -104,7 +104,7 @@ github.com/docker/cli/cli/streams
 | 
				
			|||||||
github.com/docker/cli/cli/trust
 | 
					github.com/docker/cli/cli/trust
 | 
				
			||||||
github.com/docker/cli/cli/version
 | 
					github.com/docker/cli/cli/version
 | 
				
			||||||
github.com/docker/cli/opts
 | 
					github.com/docker/cli/opts
 | 
				
			||||||
# github.com/docker/cli-docs-tool v0.3.0
 | 
					# github.com/docker/cli-docs-tool v0.4.0
 | 
				
			||||||
## explicit
 | 
					## explicit
 | 
				
			||||||
github.com/docker/cli-docs-tool
 | 
					github.com/docker/cli-docs-tool
 | 
				
			||||||
github.com/docker/cli-docs-tool/annotation
 | 
					github.com/docker/cli-docs-tool/annotation
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user