docs: standardize format for usage

Use the usage output of `--help` for each subcommand, to make
sure all flags/options are included on the page, and to make
it easier to keep docs in sync.

Note that the usage output is only used when reading these
docs on GitHub; docs.docker.com only consumes the "description"
and "example" sections (when present), and generates flag information
and usage output from source

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
pull/506/head
Sebastiaan van Stijn 4 years ago
parent ff749d8863
commit 1a8af33ff6
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

@ -1,22 +1,24 @@
# `buildx bake [OPTIONS] [TARGET...]` # buildx bake
Bake is a high-level build command. ```
Usage: docker buildx bake [OPTIONS] [TARGET...]
Each specified target will run in parallel as part of the build.
Options: Build from a file
| Flag | Description | Aliases:
| --- | --- | bake, f
| -f, --file stringArray | Build definition file
| --load | Shorthand for --set=*.output=type=docker
| --no-cache | Do not use cache when building the image
| --print | Print the options without building
| --progress string | Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
| --pull | Always attempt to pull a newer version of the image
| --push | Shorthand for --set=*.output=type=registry
| --set stringArray | Override target value (eg: targetpattern.key=value)
Options:
--builder string Override the configured builder instance
-f, --file stringArray Build definition file
--load Shorthand for --set=*.output=type=docker
--no-cache Do not use cache when building the image
--print Print the options without building
--progress string Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
--pull Always attempt to pull a newer version of the image
--push Shorthand for --set=*.output=type=registry
--set stringArray Override target value (eg: targetpattern.key=value)
```
## Description ## Description

@ -1,32 +1,36 @@
# `buildx build [OPTIONS] PATH | URL | -` # buildx build
The `buildx build` command starts a build using BuildKit. This command is similar ```
to the UI of `docker build` command and takes the same flags and arguments. Usage: docker buildx build [OPTIONS] PATH | URL | -
Options: Start a build
| Flag | Description | Aliases:
| --- | --- | build, b
| --add-host [] | Add a custom host-to-IP mapping (host:ip)
| --allow [] | Allow extra privileged entitlement, e.g. network.host, security.insecure Options:
| --build-arg [] | Set build-time variables --add-host strings Add a custom host-to-IP mapping (host:ip)
| --cache-from [] | External cache sources (eg. user/app:cache, type=local,src=path/to/dir) --allow strings Allow extra privileged entitlement, e.g. network.host, security.insecure
| --cache-to [] | Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir) --build-arg stringArray Set build-time variables
| --file string | Name of the Dockerfile (Default is 'PATH/Dockerfile') --builder string Override the configured builder instance
| --iidfile string | Write the image ID to the file --cache-from stringArray External cache sources (eg. user/app:cache, type=local,src=path/to/dir)
| --label [] | Set metadata for an image --cache-to stringArray Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
| --load | Shorthand for --output=type=docker -f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
| --network string | Set the networking mode for the RUN instructions during build (default "default") --iidfile string Write the image ID to the file
| --no-cache | Do not use cache when building the image --label stringArray Set metadata for an image
| --output [] | Output destination (format: type=local,dest=path) --load Shorthand for --output=type=docker
| --platform [] | Set target platform for build --network string Set the networking mode for the RUN instructions during build (default "default")
| --progress string | Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto") --no-cache Do not use cache when building the image
| --pull | Always attempt to pull a newer version of the image -o, --output stringArray Output destination (format: type=local,dest=path)
| --push | Shorthand for --output=type=registry --platform stringArray Set target platform for build
| --secret [] | Secret file to expose to the build: id=mysecret,src=/local/secret --progress string Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
| --ssh [] | SSH agent socket or keys to expose to the build (format: default\|&#60;id&#62;[=&#60;socket&#62;\|&#60;key&#62;[,&#60;key&#62;]]) --pull Always attempt to pull a newer version of the image
| --tag [] | Name and optionally a tag in the 'name:tag' format --push Shorthand for --output=type=registry
| --target string | Set the target build stage to build. --secret stringArray Secret file to expose to the build: id=mysecret,src=/local/secret
--ssh stringArray SSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]])
-t, --tag stringArray Name and optionally a tag in the 'name:tag' format
--target string Set the target build stage to build.
```
## Description ## Description

@ -1,19 +1,23 @@
# `buildx create [OPTIONS] [CONTEXT|ENDPOINT]` # buildx create
Options: ```
Usage: docker buildx create [OPTIONS] [CONTEXT|ENDPOINT]
Create a new builder instance
| Flag | Description | Options:
| --- | --- | --append Append a node to builder instead of changing it
| --append | Append a node to builder instead of changing it --builder string Override the configured builder instance
| --buildkitd-flags string | Flags for buildkitd daemon --buildkitd-flags string Flags for buildkitd daemon
| --config string | BuildKit config file --config string BuildKit config file
| --driver string | Driver to use (eg. docker-container) --driver string Driver to use (available: [docker docker-container kubernetes])
| --driver-opt stringArray | Options for the driver --driver-opt stringArray Options for the driver
| --leave | Remove a node from builder instead of changing it --leave Remove a node from builder instead of changing it
| --name string | Builder instance name --name string Builder instance name
| --node string | Create/modify node with given name --node string Create/modify node with given name
| --platform stringArray | Fixed platforms for current node --platform stringArray Fixed platforms for current node
| --use | Set the current builder instance --use Set the current builder instance
```
## Description ## Description

@ -1,13 +1,17 @@
# `buildx imagetools create [OPTIONS] [SOURCE] [SOURCE...]` # buildx imagetools create
Options: ```
Usage: docker buildx imagetools create [OPTIONS] [SOURCE] [SOURCE...]
Create a new image based on source images
| Flag | Description | Options:
| --- | --- | --append Append to existing manifest
| --append | Append to existing manifest --builder string Override the configured builder instance
| --dry-run | Show final image instead of pushing --dry-run Show final image instead of pushing
| -f, --file stringArray | Read source descriptor from file -f, --file stringArray Read source descriptor from file
| -t, --tag stringArray | Set reference for new image -t, --tag stringArray Set reference for new image
```
## Description ## Description

@ -1,4 +1,14 @@
# `buildx imagetools inspect NAME` # buildx imagetools inspect
```
Usage: docker buildx imagetools inspect [OPTIONS] NAME
Show details of image in the registry
Options:
--builder string Override the configured builder instance
--raw Show original JSON manifest
```
## Description ## Description

@ -1,4 +1,14 @@
# `buildx inspect [NAME]` # buildx inspect
```
Usage: docker buildx inspect [NAME]
Inspect current builder instance
Options:
--bootstrap Ensure builder has booted before inspecting
--builder string Override the configured builder instance
```
## Description ## Description

@ -1,4 +1,13 @@
# `buildx ls` # buildx ls
```
Usage: docker buildx ls
List builder instances
Options:
--builder string Override the configured builder instance
```
## Description ## Description

@ -1,4 +1,13 @@
# `buildx rm [NAME]` # buildx rm
```
Usage: docker buildx rm [NAME]
Remove a builder instance
Options:
--builder string Override the configured builder instance
```
## Description ## Description

@ -1,4 +1,13 @@
# `buildx stop [NAME]` # buildx stop
```
Usage: docker buildx stop [NAME]
Stop builder instance
Options:
--builder string Override the configured builder instance
```
## Description ## Description

@ -1,4 +1,15 @@
# `buildx use NAME` # buildx use
```
Usage: docker buildx use [OPTIONS] NAME
Set the current builder instance
Options:
--builder string Override the configured builder instance
--default Set builder as default for current context
--global Builder persists context changes
```
## Description ## Description

Loading…
Cancel
Save