vendor: github.com/docker/buildx v0.18.0

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-10-31 10:39:12 +01:00
parent f2b750218c
commit 812b82cd0d
9 changed files with 115 additions and 18 deletions

View File

@ -844,7 +844,7 @@ The following example forces the builder to always pull all images referenced in
```hcl ```hcl
target "default" { target "default" {
pull = "always" pull = true
} }
``` ```

View File

@ -1,6 +1,6 @@
# github.com/moby/moby v27.3.1+incompatible # github.com/moby/moby v27.3.1+incompatible
# github.com/moby/buildkit v0.17.0 # github.com/moby/buildkit v0.17.0
# github.com/docker/buildx v0.17.1 # github.com/docker/buildx v0.18.0
# github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible # github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible
# github.com/docker/compose/v2 v2.30.1 # github.com/docker/compose/v2 v2.30.1
# github.com/docker/scout-cli v1.13.0 # github.com/docker/scout-cli v1.13.0

View File

@ -1,6 +1,7 @@
command: docker buildx command: docker buildx
short: Docker Buildx short: Docker Buildx
long: Extended build capabilities with BuildKit long: Extended build capabilities with BuildKit
usage: docker buildx
pname: docker pname: docker
plink: docker.yaml plink: docker.yaml
cname: cname:

View File

@ -1115,7 +1115,7 @@ examples: |-
```dockerfile ```dockerfile
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM oven/bun:1 as base FROM oven/bun:1 AS base
WORKDIR /app WORKDIR /app
FROM base AS install FROM base AS install
@ -1401,17 +1401,39 @@ examples: |-
Supported types are: Supported types are:
- [`file`](#file) - [`type=file`](#typefile)
- [`env`](#env) - [`type=env`](#typeenv)
Buildx attempts to detect the `type` automatically if unset. Buildx attempts to detect the `type` automatically if unset. If an environment
variable with the same key as `id` is set, then Buildx uses `type=env` and the
variable value becomes the secret. If no such environment variable is set, and
`type` is not set, then Buildx falls back to `type=file`.
#### `file` #### `type=file`
Attribute keys: Source a build secret from a file.
- `id` - ID of the secret. Defaults to base name of the `src` path. ##### `type=file` synopsis
- `src`, `source` - Secret filename. `id` used if unset.
```console
$ docker buildx build --secret [type=file,]id=<ID>[,src=<FILEPATH>] .
```
##### `type=file` attributes
| Key | Description | Default |
| --------------- | ----------------------------------------------------------------------------------------------------- | -------------------------- |
| `id` | ID of the secret. | N/A (this key is required) |
| `src`, `source` | Filepath of the file containing the secret value (absolute or relative to current working directory). | `id` if unset. |
###### `type=file` usage
In the following example, `type=file` is automatically detected because no
environment variable mathing `aws` (the ID) is set.
```console
$ docker buildx build --secret id=aws,src=$HOME/.aws/credentials .
```
```dockerfile ```dockerfile
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
@ -1421,16 +1443,31 @@ examples: |-
aws s3 cp s3://... ... aws s3 cp s3://... ...
``` ```
#### `type=env`
Source a build secret from an environment variable.
##### `type=env` synopsis
```console ```console
$ docker buildx build --secret id=aws,src=$HOME/.aws/credentials . $ docker buildx build --secret [type=env,]id=<ID>[,env=<VARIABLE>] .
``` ```
#### `env` ##### `type=env` attributes
Attribute keys: | Key | Description | Default |
| ---------------------- | ----------------------------------------------- | -------------------------- |
| `id` | ID of the secret. | N/A (this key is required) |
| `env`, `src`, `source` | Environment variable to source the secret from. | `id` if unset. |
- `id` - ID of the secret. Defaults to `env` name. ##### `type=env` usage
- `env` - Secret environment variable. `id` used if unset, otherwise will look for `src`, `source` if `id` unset.
In the following example, `type=env` is automatically detected because an
environment variable matching `id` is set.
```console
$ SECRET_TOKEN=token docker buildx build --secret id=SECRET_TOKEN .
```
```dockerfile ```dockerfile
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
@ -1440,10 +1477,26 @@ examples: |-
yarn run test yarn run test
``` ```
In the following example, the build argument `SECRET_TOKEN` is set to contain
the value of the environment variable `API_KEY`.
```console ```console
$ SECRET_TOKEN=token docker buildx build --secret id=SECRET_TOKEN . $ API_KEY=token docker buildx build --secret id=SECRET_TOKEN,env=API_KEY .
``` ```
You can also specify the name of the environment variable with `src` or `source`:
```console
$ API_KEY=token docker buildx build --secret type=env,id=SECRET_TOKEN,src=API_KEY .
```
> [!NOTE]
> Specifying the environment variable name with `src` or `source`, you are
> required to set `type=env` explicitly, or else Buildx assumes that the secret
> is `type=file`, and looks for a file with the name of `src` or `source` (in
> this case, a file named `API_KEY` relative to the location where the `docker
> buildx build` command was executed.
### Shared memory size for build containers (--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 Sets the size of the shared memory allocated for build containers when using

View File

@ -4,6 +4,7 @@ long: |-
The `imagetools` commands contains subcommands for working with manifest lists The `imagetools` commands contains subcommands for working with manifest lists
in container registries. These commands are useful for inspecting manifests in container registries. These commands are useful for inspecting manifests
to check multi-platform configuration and attestations. to check multi-platform configuration and attestations.
usage: docker buildx imagetools
pname: docker buildx pname: docker buildx
plink: docker_buildx.yaml plink: docker_buildx.yaml
cname: cname:

View File

@ -39,6 +39,16 @@ options:
experimentalcli: false experimentalcli: false
kubernetes: false kubernetes: false
swarm: false swarm: false
- option: no-trunc
value_type: bool
default_value: "false"
description: Don't truncate output
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options: inherited_options:
- option: debug - option: debug
shorthand: D shorthand: D

View File

@ -57,6 +57,36 @@ options:
value_type: bytes value_type: bytes
default_value: "0" default_value: "0"
description: Amount of disk space to keep for cache description: Amount of disk space to keep for cache
deprecated: true
hidden: true
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: max-used-space
value_type: bytes
default_value: "0"
description: Maximum amount of disk space allowed to keep for cache
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: min-free-space
value_type: bytes
default_value: "0"
description: Target amount of free disk space after pruning
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: reserved-space
value_type: bytes
default_value: "0"
description: Amount of disk space always allowed to keep for cache
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

4
go.mod
View File

@ -3,7 +3,7 @@ module github.com/docker/docs
go 1.23.1 go 1.23.1
require ( require (
github.com/docker/buildx v0.17.1 // indirect github.com/docker/buildx v0.18.0 // indirect
github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible // indirect github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible // indirect
github.com/docker/compose/v2 v2.30.1 // indirect github.com/docker/compose/v2 v2.30.1 // indirect
github.com/docker/scout-cli v1.13.0 // indirect github.com/docker/scout-cli v1.13.0 // indirect
@ -12,7 +12,7 @@ require (
) )
replace ( replace (
github.com/docker/buildx => github.com/docker/buildx v0.17.1 github.com/docker/buildx => github.com/docker/buildx v0.18.0
github.com/docker/cli => github.com/docker/cli v27.3.1+incompatible github.com/docker/cli => github.com/docker/cli v27.3.1+incompatible
github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.30.1 github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.30.1
github.com/docker/scout-cli => github.com/docker/scout-cli v1.13.0 github.com/docker/scout-cli => github.com/docker/scout-cli v1.13.0

2
go.sum
View File

@ -82,6 +82,8 @@ github.com/docker/buildx v0.17.0 h1:Z+QQxsJJPldaeU/4aNXoudFwDDK0/ALFYmDcP5q5fiY=
github.com/docker/buildx v0.17.0/go.mod h1:sBKkoZFs+R2D6ARyQ4/GE/FQHHFsl9PkHdvv/GXAsMo= github.com/docker/buildx v0.17.0/go.mod h1:sBKkoZFs+R2D6ARyQ4/GE/FQHHFsl9PkHdvv/GXAsMo=
github.com/docker/buildx v0.17.1 h1:9ob2jGp4+W9PxWw68GsoNFp+eYFc7eUoRL9VljLCSM4= github.com/docker/buildx v0.17.1 h1:9ob2jGp4+W9PxWw68GsoNFp+eYFc7eUoRL9VljLCSM4=
github.com/docker/buildx v0.17.1/go.mod h1:kJOhOhS47LRvrLFRulFiO5SE6VJf54yYMn7DzjgO5W0= github.com/docker/buildx v0.17.1/go.mod h1:kJOhOhS47LRvrLFRulFiO5SE6VJf54yYMn7DzjgO5W0=
github.com/docker/buildx v0.18.0 h1:rSauXHeJt90NvtXrLK5J992Eb0UPJZs2vV3u1zTf1nE=
github.com/docker/buildx v0.18.0/go.mod h1:JGNSshOhHs5FhG3u51jXUf4lLOeD2QBIlJ2vaRB67p4=
github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM= github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM=
github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v24.0.4+incompatible h1:Y3bYF9ekNTm2VFz5U/0BlMdJy73D+Y1iAAZ8l63Ydzw= github.com/docker/cli v24.0.4+incompatible h1:Y3bYF9ekNTm2VFz5U/0BlMdJy73D+Y1iAAZ8l63Ydzw=