docs: add documentation for --buildkitd-flags, --config, --driver-opt on create

Signed-off-by: Tibor Vass <tibor@docker.com>
pull/124/head
Tibor Vass 6 years ago
parent 5c5f54c6d6
commit be3efc979b

@ -332,13 +332,41 @@ Options:
| Flag | Description | | Flag | Description |
| --- | --- | | --- | --- |
| --append | Append a node to builder instead of changing it | --append | Append a node to builder instead of changing it
| --buildkitd-flags string | Flags for buildkitd daemon
| --config string | BuildKit config file
| --driver string | Driver to use (eg. docker-container) | --driver string | Driver to use (eg. docker-container)
| --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
#### `--append`
Changes the action of the command to appends a new node to an existing builder specified by `--name`. Buildx will choose an appropriate node for a build based on the platforms it supports.
Example:
```
$ docker buildx create mycontext1
eager_beaver
$ docker buildx create --name eager_beaver --append mycontext2
eager_beaver
```
#### `--buildkitd-flags FLAGS`
Adds flags when starting the buildkitd daemon. They take precedence over the configuration file specified by `--config`. See `buildkitd --help` for the available flags.
Example:
```
--buildkitd-flags '--debug --debugaddr 0.0.0.0:6666'
```
#### `--config FILE`
Specifies the configuration file for the buildkitd daemon to use. The configuration can be overridden by `--buildkitd-flags`. See an [example buildkitd configuration file](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md).
#### `--driver DRIVER` #### `--driver DRIVER`
Sets the builder driver to be used. There are two available drivers, each have their own specificities. Sets the builder driver to be used. There are two available drivers, each have their own specificities.
@ -347,16 +375,18 @@ Sets the builder driver to be used. There are two available drivers, each have t
- `docker-container` - Uses a buildkit container that will be spawned via docker. With this driver, both building multi-platform images and exporting cache are supported. However, images built will not automatically appear in `docker images` (see [`build --load`](#--load)). - `docker-container` - Uses a buildkit container that will be spawned via docker. With this driver, both building multi-platform images and exporting cache are supported. However, images built will not automatically appear in `docker images` (see [`build --load`](#--load)).
#### `--append`
Changes the action of the command to appends a new node to an existing builder specified by `--name`. Buildx will choose an appropriate node for a build based on the platforms it supports. #### `--driver-opt OPTIONS`
Example: Passes additional driver-specific options. Details for each driver:
- `docker` - No driver options
- `docker-container`
- `image` - Sets the container image to be used for running buildkit.
- `network` - Sets the network mode for running the buildkit container.
- Example:
``` ```
$ docker buildx create mycontext1 --driver docker-container --driver-opt image=moby/buildkit:master,network=host
eager_beaver
$ docker buildx create --name eager_beaver --append mycontext2
eager_beaver
``` ```
#### `--leave` #### `--leave`

Loading…
Cancel
Save