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
53 changes: 52 additions & 1 deletion _vendor/github.com/docker/buildx/docs/bake-reference.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions _vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# github.com/moby/moby v25.0.3-0.20240203133757-341a7978a541+incompatible
# github.com/moby/buildkit v0.13.0-beta3.0.20240201135300-d906167d0b34
# github.com/docker/buildx v0.12.2-0.20240220084849-89154c7d3303
# github.com/moby/buildkit v0.13.0
# github.com/docker/buildx v0.13.0
# github.com/docker/scout-cli v1.4.1
# github.com/docker/cli v25.0.4-0.20240221083216-f67e569a8fb9+incompatible
# github.com/docker/cli v26.0.0-rc1+incompatible
# github.com/docker/compose/v2 v2.24.6
2 changes: 2 additions & 0 deletions data/buildx/docker_buildx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cname:
- docker buildx build
- docker buildx create
- docker buildx debug
- docker buildx dial-stdio
- docker buildx du
- docker buildx imagetools
- docker buildx inspect
Expand All @@ -22,6 +23,7 @@ clink:
- docker_buildx_build.yaml
- docker_buildx_create.yaml
- docker_buildx_debug.yaml
- docker_buildx_dial-stdio.yaml
- docker_buildx_du.yaml
- docker_buildx_imagetools.yaml
- docker_buildx_inspect.yaml
Expand Down
29 changes: 25 additions & 4 deletions data/buildx/docker_buildx_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ options:
- option: shm-size
value_type: bytes
default_value: "0"
description: Size of `/dev/shm`
description: Shared memory size for build containers
details_url: '#shm-size'
deprecated: false
hidden: false
Expand Down Expand Up @@ -613,7 +613,7 @@ examples: |-
- `security.insecure` - Allows executions without sandbox. See
[related Dockerfile extensions](/reference/dockerfile/#run---securitysandbox).

For entitlements to be enabled, the `buildkitd` daemon also needs to allow them
For entitlements to be enabled, the BuildKit daemon also needs to allow them
with `--allow-insecure-entitlement` (see [`create --buildkitd-flags`](/reference/cli/docker/buildx/create/#buildkitd-flags)).

```console
Expand Down Expand Up @@ -786,6 +786,7 @@ examples: |-

```json
{
"buildx.build.ref": "mybuilder/mybuilder0/0fjb6ubs52xx3vygf6fgdl611",
"containerimage.config.digest": "sha256:2937f66a9722f7f4a2df583de2f8cb97fc9196059a410e7f00072fc918930e66",
"containerimage.descriptor": {
"annotations": {
Expand Down Expand Up @@ -882,6 +883,10 @@ examples: |-
$ docker buildx build -t tonistiigi/foo -o type=registry
```

> **Note **
>
> Since BuildKit v0.13.0 multiple outputs can be specified by repeating the flag.

Supported exported types are:

#### `local`
Expand Down Expand Up @@ -1112,12 +1117,21 @@ examples: |-
$ SECRET_TOKEN=token docker buildx build --secret id=SECRET_TOKEN .
```

### Size of /dev/shm (--shm-size) {#shm-size}
### Shared memory size for build containers (--shm-size) {#shm-size}

Sets the size of the shared memory allocated for build containers when using
`RUN` instructions.

The format is `<number><unit>`. `number` must be greater than `0`. Unit is
optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g`
(gigabytes). If you omit the unit, the system uses bytes.

> **Note**
>
> In most cases, it is recommended to let the builder automatically determine
> the appropriate configurations. Manual adjustments should only be considered
> when specific performance tuning is required for complex build scenarios.

### SSH agent socket or keys to expose to the build (--ssh) {#ssh}

```text
Expand Down Expand Up @@ -1151,7 +1165,8 @@ examples: |-

### Set ulimits (--ulimit) {#ulimit}

`--ulimit` is specified with a soft and hard limit as such:
`--ulimit` overrides the default ulimits of build's containers when using `RUN`
instructions and are specified with a soft and hard limit as such:
`<type>=<soft limit>[:<hard limit>]`, for example:

```console
Expand All @@ -1163,6 +1178,12 @@ examples: |-
> If you don't provide a `hard limit`, the `soft limit` is used
> for both values. If no `ulimits` are set, they're inherited from
> the default `ulimits` set on the daemon.

> **Note**
>
> In most cases, it is recommended to let the builder automatically determine
> the appropriate configurations. Manual adjustments should only be considered
> when specific performance tuning is required for complex build scenarios.
deprecated: false
hidden: false
experimental: false
Expand Down
75 changes: 50 additions & 25 deletions data/buildx/docker_buildx_create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,19 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: buildkitd-config
value_type: string
description: BuildKit daemon config file
details_url: '#buildkitd-config'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: buildkitd-flags
value_type: string
description: Flags for buildkitd daemon
description: BuildKit daemon flags
details_url: '#buildkitd-flags'
deprecated: false
hidden: false
Expand All @@ -55,10 +65,9 @@ options:
swarm: false
- option: config
value_type: string
description: BuildKit config file
details_url: '#config'
description: BuildKit daemon config file
deprecated: false
hidden: false
hidden: true
experimental: false
experimentalcli: false
kubernetes: false
Expand Down Expand Up @@ -153,29 +162,15 @@ examples: |-
eager_beaver
```

### Specify options for the buildkitd daemon (--buildkitd-flags) {#buildkitd-flags}
### Specify a configuration file for the BuildKit daemon (--buildkitd-config) {#buildkitd-config}

```text
--buildkitd-flags FLAGS
--buildkitd-config FILE
```

Adds flags when starting the buildkitd daemon. They take precedence over the
configuration file specified by [`--config`](#config). See `buildkitd --help`
for the available flags.

```text
--buildkitd-flags '--debug --debugaddr 0.0.0.0:6666'
```

### Specify a configuration file for the buildkitd daemon (--config) {#config}

```text
--config FILE
```

Specifies the configuration file for the buildkitd daemon to use. The configuration
can be overridden by [`--buildkitd-flags`](#buildkitd-flags).
See an [example buildkitd configuration file](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md).
Specifies the configuration file for the BuildKit daemon to use. The
configuration can be overridden by [`--buildkitd-flags`](#buildkitd-flags).
See an [example BuildKit daemon configuration file](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md).

If you don't specify a configuration file, Buildx looks for one by default in:

Expand All @@ -188,6 +183,36 @@ examples: |-
will be copied into the container under `/etc/buildkit/certs` and configuration
will be updated to reflect that.

### Specify options for the BuildKit daemon (--buildkitd-flags) {#buildkitd-flags}

```text
--buildkitd-flags FLAGS
```

Adds flags when starting the BuildKit daemon. They take precedence over the
configuration file specified by [`--buildkitd-config`](#buildkitd-config). See
`buildkitd --help` for the available flags.

```text
--buildkitd-flags '--debug --debugaddr 0.0.0.0:6666'
```

#### BuildKit daemon network mode

You can specify the network mode for the BuildKit daemon with either the
configuration file specified by [`--buildkitd-config`](#buildkitd-config) using the
`worker.oci.networkMode` option or `--oci-worker-net` flag here. The default
value is `auto` and can be one of `bridge`, `cni`, `host`:

```text
--buildkitd-flags '--oci-worker-net bridge'
```

> **Note**
>
> Network mode "bridge" is supported since BuildKit v0.13 and will become the
> default in next v0.14.

### Set the builder driver to use (--driver) {#driver}

```text
Expand Down Expand Up @@ -231,8 +256,8 @@ examples: |-

#### `remote` driver

Uses a remote instance of buildkitd over an arbitrary connection. With this
driver, you manually create and manage instances of buildkit yourself, and
Uses a remote instance of BuildKit daemon over an arbitrary connection. With
this driver, you manually create and manage instances of buildkit yourself, and
configure buildx to point at it.

Unlike `docker` driver, built images will not automatically appear in
Expand Down
2 changes: 1 addition & 1 deletion data/buildx/docker_buildx_debug_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ options:
- option: shm-size
value_type: bytes
default_value: "0"
description: Size of `/dev/shm`
description: Shared memory size for build containers
deprecated: false
hidden: false
experimental: false
Expand Down
70 changes: 70 additions & 0 deletions data/buildx/docker_buildx_dial-stdio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
command: docker buildx dial-stdio
short: Proxy current stdio streams to builder instance
long: |-
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.
usage: docker buildx dial-stdio
pname: docker buildx
plink: docker_buildx.yaml
options:
- option: platform
value_type: string
description: 'Target platform: this is used for node selection'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: progress
value_type: string
default_value: quiet
description: Set type of progress output (auto, plain, tty).
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: builder
value_type: string
description: Override the configured builder instance
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
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.

```go
client.New(ctx, "", client.WithContextDialer(func(context.Context, string) (net.Conn, error) {
c1, c2 := net.Pipe()
cmd := exec.Command("docker", "buildx", "dial-stdio")
cmd.Stdin = c1
cmd.Stdout = c1

if err := cmd.Start(); err != nil {
c1.Close()
c2.Close()
return nil, err
}

go func() {
cmd.Wait()
c2.Close()
}()

return c2
}))
```
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

Loading