mirror of https://github.com/docker/docs.git
Merge pull request #15422 from docker-tools-robot/dispatch/buildx-ref-v0.9.1
Update buildx reference to v0.9.1
This commit is contained in:
commit
c21f31badf
|
@ -4,33 +4,33 @@ long: Extended build capabilities with BuildKit
|
|||
pname: docker
|
||||
plink: docker.yaml
|
||||
cname:
|
||||
- docker buildx bake
|
||||
- docker buildx build
|
||||
- docker buildx create
|
||||
- docker buildx du
|
||||
- docker buildx imagetools
|
||||
- docker buildx inspect
|
||||
- docker buildx ls
|
||||
- docker buildx prune
|
||||
- docker buildx rm
|
||||
- docker buildx stop
|
||||
- docker buildx use
|
||||
- docker buildx version
|
||||
- docker buildx bake
|
||||
- docker buildx build
|
||||
- docker buildx create
|
||||
- docker buildx du
|
||||
- docker buildx imagetools
|
||||
- docker buildx inspect
|
||||
- docker buildx ls
|
||||
- docker buildx prune
|
||||
- docker buildx rm
|
||||
- docker buildx stop
|
||||
- docker buildx use
|
||||
- docker buildx version
|
||||
clink:
|
||||
- docker_buildx_bake.yaml
|
||||
- docker_buildx_build.yaml
|
||||
- docker_buildx_create.yaml
|
||||
- docker_buildx_du.yaml
|
||||
- docker_buildx_imagetools.yaml
|
||||
- docker_buildx_inspect.yaml
|
||||
- docker_buildx_ls.yaml
|
||||
- docker_buildx_prune.yaml
|
||||
- docker_buildx_rm.yaml
|
||||
- docker_buildx_stop.yaml
|
||||
- docker_buildx_use.yaml
|
||||
- docker_buildx_version.yaml
|
||||
- docker_buildx_bake.yaml
|
||||
- docker_buildx_build.yaml
|
||||
- docker_buildx_create.yaml
|
||||
- docker_buildx_du.yaml
|
||||
- docker_buildx_imagetools.yaml
|
||||
- docker_buildx_inspect.yaml
|
||||
- docker_buildx_ls.yaml
|
||||
- docker_buildx_prune.yaml
|
||||
- docker_buildx_rm.yaml
|
||||
- docker_buildx_stop.yaml
|
||||
- docker_buildx_use.yaml
|
||||
- docker_buildx_version.yaml
|
||||
options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
command: docker buildx build
|
||||
aliases: b
|
||||
aliases: docker buildx build, docker buildx b
|
||||
short: Start a build
|
||||
long: |-
|
||||
The `buildx build` command starts a build using BuildKit. This command is similar
|
||||
|
@ -12,7 +12,7 @@ usage: docker buildx build [OPTIONS] PATH | URL | -
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
options:
|
||||
- option: add-host
|
||||
- option: add-host
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: 'Add a custom host-to-IP mapping (format: `host:ip`)'
|
||||
|
@ -23,7 +23,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: allow
|
||||
- option: allow
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: |
|
||||
|
@ -35,7 +35,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: build-arg
|
||||
- option: build-arg
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Set build-time variables
|
||||
|
@ -46,7 +46,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: build-context
|
||||
- option: build-context
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Additional build contexts (e.g., name=path)
|
||||
|
@ -57,7 +57,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cache-from
|
||||
- option: cache-from
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: |
|
||||
|
@ -69,7 +69,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cache-to
|
||||
- option: cache-to
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: |
|
||||
|
@ -81,7 +81,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cgroup-parent
|
||||
- option: cgroup-parent
|
||||
value_type: string
|
||||
description: Optional parent cgroup for the container
|
||||
details_url: /engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent
|
||||
|
@ -91,7 +91,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: compress
|
||||
- option: compress
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Compress the build context using gzip
|
||||
|
@ -101,7 +101,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cpu-period
|
||||
- option: cpu-period
|
||||
value_type: int64
|
||||
default_value: "0"
|
||||
description: Limit the CPU CFS (Completely Fair Scheduler) period
|
||||
|
@ -111,7 +111,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cpu-quota
|
||||
- option: cpu-quota
|
||||
value_type: int64
|
||||
default_value: "0"
|
||||
description: Limit the CPU CFS (Completely Fair Scheduler) quota
|
||||
|
@ -121,7 +121,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cpu-shares
|
||||
- option: cpu-shares
|
||||
shorthand: c
|
||||
value_type: int64
|
||||
default_value: "0"
|
||||
|
@ -132,7 +132,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cpuset-cpus
|
||||
- option: cpuset-cpus
|
||||
value_type: string
|
||||
description: CPUs in which to allow execution (`0-3`, `0,1`)
|
||||
deprecated: false
|
||||
|
@ -141,7 +141,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: cpuset-mems
|
||||
- option: cpuset-mems
|
||||
value_type: string
|
||||
description: MEMs in which to allow execution (`0-3`, `0,1`)
|
||||
deprecated: false
|
||||
|
@ -150,7 +150,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: file
|
||||
- option: file
|
||||
shorthand: f
|
||||
value_type: string
|
||||
description: 'Name of the Dockerfile (default: `PATH/Dockerfile`)'
|
||||
|
@ -161,7 +161,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: force-rm
|
||||
- option: force-rm
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Always remove intermediate containers
|
||||
|
@ -171,7 +171,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: iidfile
|
||||
- option: iidfile
|
||||
value_type: string
|
||||
description: Write the image ID to the file
|
||||
deprecated: false
|
||||
|
@ -180,7 +180,16 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: isolation
|
||||
- option: invoke
|
||||
value_type: string
|
||||
description: Invoke a command after the build [experimental]
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: isolation
|
||||
value_type: string
|
||||
description: Container isolation technology
|
||||
deprecated: false
|
||||
|
@ -189,7 +198,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: label
|
||||
- option: label
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Set metadata for an image
|
||||
|
@ -199,7 +208,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: load
|
||||
- option: load
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Shorthand for `--output=type=docker`
|
||||
|
@ -210,7 +219,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: memory
|
||||
- option: memory
|
||||
shorthand: m
|
||||
value_type: string
|
||||
description: Memory limit
|
||||
|
@ -220,7 +229,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: memory-swap
|
||||
- option: memory-swap
|
||||
value_type: string
|
||||
description: |
|
||||
Swap limit equal to memory plus swap: `-1` to enable unlimited swap
|
||||
|
@ -230,7 +239,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: metadata-file
|
||||
- option: metadata-file
|
||||
value_type: string
|
||||
description: Write build result metadata to the file
|
||||
details_url: '#metadata-file'
|
||||
|
@ -240,7 +249,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: network
|
||||
- option: network
|
||||
value_type: string
|
||||
default_value: default
|
||||
description: Set the networking mode for the `RUN` instructions during build
|
||||
|
@ -250,7 +259,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-cache
|
||||
- option: no-cache
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Do not use cache when building the image
|
||||
|
@ -260,7 +269,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-cache-filter
|
||||
- option: no-cache-filter
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Do not cache specified stages
|
||||
|
@ -270,7 +279,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: output
|
||||
- option: output
|
||||
shorthand: o
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
|
@ -282,7 +291,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: platform
|
||||
- option: platform
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Set target platform for build
|
||||
|
@ -293,7 +302,17 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: progress
|
||||
- option: print
|
||||
value_type: string
|
||||
description: |
|
||||
Print result of information request (e.g., outline, targets) [experimental]
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: progress
|
||||
value_type: string
|
||||
default_value: auto
|
||||
description: |
|
||||
|
@ -305,7 +324,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: pull
|
||||
- option: pull
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Always attempt to pull all referenced images
|
||||
|
@ -315,7 +334,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: push
|
||||
- option: push
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Shorthand for `--output=type=registry`
|
||||
|
@ -326,7 +345,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: quiet
|
||||
- option: quiet
|
||||
shorthand: q
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
@ -337,7 +356,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: rm
|
||||
- option: rm
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Remove intermediate containers after a successful build
|
||||
|
@ -347,7 +366,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: secret
|
||||
- option: secret
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: |
|
||||
|
@ -359,7 +378,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: security-opt
|
||||
- option: security-opt
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: Security options
|
||||
|
@ -369,7 +388,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: shm-size
|
||||
- option: shm-size
|
||||
value_type: bytes
|
||||
default_value: "0"
|
||||
description: Size of `/dev/shm`
|
||||
|
@ -380,7 +399,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: squash
|
||||
- option: squash
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Squash newly built layers into a single new layer
|
||||
|
@ -390,7 +409,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: ssh
|
||||
- option: ssh
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: |
|
||||
|
@ -402,7 +421,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tag
|
||||
- option: tag
|
||||
shorthand: t
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
|
@ -414,7 +433,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: target
|
||||
- option: target
|
||||
value_type: string
|
||||
description: Set the target build stage to build
|
||||
details_url: /engine/reference/commandline/build/#specifying-target-build-stage---target
|
||||
|
@ -424,7 +443,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: ulimit
|
||||
- option: ulimit
|
||||
value_type: ulimit
|
||||
default_value: '[]'
|
||||
description: Ulimit options
|
||||
|
@ -436,7 +455,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
@ -457,7 +476,7 @@ examples: |-
|
|||
|
||||
- `network.host` - Allows executions with host networking.
|
||||
- `security.insecure` - Allows executions without sandbox. See
|
||||
[related Dockerfile extensions](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md#run---securityinsecuresandbox).
|
||||
[related Dockerfile extensions](/engine/reference/builder/#run---securitysandbox).
|
||||
|
||||
For entitlements to be enabled, the `buildkitd` daemon also needs to allow them
|
||||
with `--allow-insecure-entitlement` (see [`create --buildkitd-flags`](buildx_create.md#buildkitd-flags))
|
||||
|
@ -478,13 +497,15 @@ examples: |-
|
|||
* `BUILDKIT_CONTEXT_KEEP_GIT_DIR=<bool>` trigger git context to keep the `.git` directory
|
||||
* `BUILDKIT_INLINE_BUILDINFO_ATTRS=<bool>` inline build info attributes in image config or not
|
||||
* `BUILDKIT_INLINE_CACHE=<bool>` inline cache metadata to image config or not
|
||||
* `BUILDKIT_MULTI_PLATFORM=<bool>` opt into determnistic output regardless of multi-platform output or not
|
||||
* `BUILDKIT_MULTI_PLATFORM=<bool>` opt into deterministic output regardless of multi-platform output or not
|
||||
|
||||
```console
|
||||
$ docker buildx build --build-arg BUILDKIT_MULTI_PLATFORM=1 .
|
||||
```
|
||||
|
||||
More built-in build args can be found in [dockerfile frontend docs](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#built-in-build-args).
|
||||
> **Note**
|
||||
>
|
||||
> More built-in build args can be found in [Dockerfile reference docs](/engine/reference/builder/#buildkit-built-in-build-args).
|
||||
|
||||
### Additional build contexts (--build-context) {#build-context}
|
||||
|
||||
|
@ -495,7 +516,7 @@ examples: |-
|
|||
Define additional build context with specified contents. In Dockerfile the context can be accessed when `FROM name` or `--from=name` is used.
|
||||
When Dockerfile defines a stage with the same name it is overwritten.
|
||||
|
||||
The value can be a local source directory, container image (with docker-image:// prefix), Git or HTTP URL.
|
||||
The value can be a local source directory, [local OCI layout compliant directory](https://github.com/opencontainers/image-spec/blob/main/image-layout.md), container image (with docker-image:// prefix), Git or HTTP URL.
|
||||
|
||||
Replace `alpine:latest` with a pinned one:
|
||||
|
||||
|
@ -515,6 +536,32 @@ examples: |-
|
|||
COPY --from=project myfile /
|
||||
```
|
||||
|
||||
#### Source image from OCI layout directory {#source-oci-layout}
|
||||
|
||||
Source an image from a local [OCI layout compliant directory](https://github.com/opencontainers/image-spec/blob/main/image-layout.md):
|
||||
|
||||
```console
|
||||
$ docker buildx build --build-context foo=oci-layout:///path/to/local/layout@sha256:abcd12345 .
|
||||
```
|
||||
|
||||
```Dockerfile
|
||||
FROM alpine
|
||||
RUN apk add git
|
||||
|
||||
COPY --from=foo myfile /
|
||||
|
||||
FROM foo
|
||||
```
|
||||
|
||||
The OCI layout directory must be compliant with the [OCI layout specification](https://github.com/opencontainers/image-spec/blob/main/image-layout.md). It looks _solely_ for hashes. It does not
|
||||
do any form of `image:tag` resolution to find the hash of the manifest; that is up to you.
|
||||
|
||||
The format of the `--build-context` must be: `<context>=oci-layout://<path-to-local-layout>@sha256:<hash-of-manifest>`, where:
|
||||
|
||||
* `context` is the name of the build context as used in the `Dockerfile`.
|
||||
* `path-to-local-layout` is the path on the local machine, where you are running `docker build`, to the spec-compliant OCI layout.
|
||||
* `hash-of-manifest` is the hash of the manifest for the image. It can be a single-architecture manifest or a multi-architecture index.
|
||||
|
||||
### Override the configured builder instance (--builder) {#builder}
|
||||
|
||||
Same as [`buildx --builder`](buildx.md#builder).
|
||||
|
@ -776,8 +823,9 @@ examples: |-
|
|||
Set type of progress output (auto, plain, tty). Use plain to show container
|
||||
output (default "auto").
|
||||
|
||||
> You can also use the `BUILDKIT_PROGRESS` environment variable to set
|
||||
> its value.
|
||||
> **Note**
|
||||
>
|
||||
> You can also use the `BUILDKIT_PROGRESS` environment variable to set its value.
|
||||
|
||||
The following example uses `plain` output during the build:
|
||||
|
||||
|
@ -794,6 +842,11 @@ examples: |-
|
|||
...
|
||||
```
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> Check also our [Color output controls guide](https://github.com/docker/buildx/blob/master/docs/guides/color-output.md)
|
||||
> for modifying the colors that are used to output information to the terminal.
|
||||
|
||||
### Push the build result to a registry (--push) {#push}
|
||||
|
||||
Shorthand for [`--output=type=registry`](#registry). Will automatically push the
|
||||
|
@ -806,7 +859,7 @@ examples: |-
|
|||
```
|
||||
|
||||
Exposes secret to the build. The secret can be used by the build using
|
||||
[`RUN --mount=type=secret` mount](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#run---mounttypesecret).
|
||||
[`RUN --mount=type=secret` mount](/engine/reference/builder/#run---mounttypesecret).
|
||||
|
||||
If `type` is unset it will be detected. Supported types are:
|
||||
|
||||
|
@ -818,7 +871,7 @@ examples: |-
|
|||
- `src`, `source` - Secret filename. `id` used if unset.
|
||||
|
||||
```dockerfile
|
||||
# syntax=docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile:1.4
|
||||
FROM python:3
|
||||
RUN pip install awscli
|
||||
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
|
||||
|
@ -837,7 +890,7 @@ examples: |-
|
|||
- `env` - Secret environment variable. `id` used if unset, otherwise will look for `src`, `source` if `id` unset.
|
||||
|
||||
```dockerfile
|
||||
# syntax=docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile:1.4
|
||||
FROM node:alpine
|
||||
RUN --mount=type=bind,target=. \
|
||||
--mount=type=secret,id=SECRET_TOKEN \
|
||||
|
@ -864,12 +917,12 @@ examples: |-
|
|||
authentication (e.g., cloning a private repository).
|
||||
|
||||
`--ssh` exposes SSH agent socket or keys to the build and can be used with the
|
||||
[`RUN --mount=type=ssh` mount](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#run---mounttypessh).
|
||||
[`RUN --mount=type=ssh` mount](/engine/reference/builder/#run---mounttypessh).
|
||||
|
||||
Example to access Gitlab using an SSH agent socket:
|
||||
|
||||
```dockerfile
|
||||
# syntax=docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile:1.4
|
||||
FROM alpine
|
||||
RUN apk add --no-cache openssh-client
|
||||
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
||||
|
|
|
@ -14,7 +14,7 @@ usage: docker buildx create [OPTIONS] [CONTEXT|ENDPOINT]
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
options:
|
||||
- option: append
|
||||
- option: append
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Append a node to builder instead of changing it
|
||||
|
@ -25,7 +25,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: bootstrap
|
||||
- option: bootstrap
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Boot builder after creation
|
||||
|
@ -35,7 +35,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: buildkitd-flags
|
||||
- option: buildkitd-flags
|
||||
value_type: string
|
||||
description: Flags for buildkitd daemon
|
||||
details_url: '#buildkitd-flags'
|
||||
|
@ -45,7 +45,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: config
|
||||
- option: config
|
||||
value_type: string
|
||||
description: BuildKit config file
|
||||
details_url: '#config'
|
||||
|
@ -55,10 +55,10 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: driver
|
||||
- option: driver
|
||||
value_type: string
|
||||
description: |
|
||||
Driver to use (available: `docker`, `docker-container`, `kubernetes`)
|
||||
Driver to use (available: `docker-container`, `kubernetes`, `remote`)
|
||||
details_url: '#driver'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
|
@ -66,7 +66,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: driver-opt
|
||||
- option: driver-opt
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Options for the driver
|
||||
|
@ -77,7 +77,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: leave
|
||||
- option: leave
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Remove a node from builder instead of changing it
|
||||
|
@ -88,7 +88,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: name
|
||||
- option: name
|
||||
value_type: string
|
||||
description: Builder instance name
|
||||
details_url: '#name'
|
||||
|
@ -98,7 +98,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: node
|
||||
- option: node
|
||||
value_type: string
|
||||
description: Create/modify node with given name
|
||||
details_url: '#node'
|
||||
|
@ -108,7 +108,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: platform
|
||||
- option: platform
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Fixed platforms for current node
|
||||
|
@ -119,7 +119,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: use
|
||||
- option: use
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Set the current builder instance
|
||||
|
@ -131,7 +131,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
deprecated: false
|
||||
|
@ -179,6 +179,11 @@ examples: |-
|
|||
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).
|
||||
|
||||
If the configuration file is not specified, will look for one by default in:
|
||||
* `$BUILDX_CONFIG/buildkitd.default.toml`
|
||||
* `$DOCKER_CONFIG/buildx/buildkitd.default.toml`
|
||||
* `~/.docker/buildx/buildkitd.default.toml`
|
||||
|
||||
Note that if you create a `docker-container` builder and have specified
|
||||
certificates for registries in the `buildkitd.toml` configuration, the files
|
||||
will be copied into the container under `/etc/buildkit/certs` and configuration
|
||||
|
@ -218,20 +223,39 @@ examples: |-
|
|||
`docker images` and [`build --load`](buildx_build.md#load) needs to be used
|
||||
to achieve that.
|
||||
|
||||
#### `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
|
||||
configure buildx to point at it.
|
||||
|
||||
Unlike `docker` driver, built images will not automatically appear in
|
||||
`docker images` and [`build --load`](buildx_build.md#load) needs to be used
|
||||
to achieve that.
|
||||
|
||||
### Set additional driver-specific options (--driver-opt) {#driver-opt}
|
||||
|
||||
```
|
||||
--driver-opt OPTIONS
|
||||
```
|
||||
|
||||
Passes additional driver-specific options. Details for each driver:
|
||||
Passes additional driver-specific options.
|
||||
|
||||
Note: When using quoted values for example for the `nodeselector` or
|
||||
`tolerations` options, ensure that quotes are escaped correctly for your shell.
|
||||
|
||||
#### `docker` driver
|
||||
|
||||
No driver options.
|
||||
|
||||
#### `docker-container` driver
|
||||
|
||||
- `docker` - No driver options
|
||||
- `docker-container`
|
||||
- `image=IMAGE` - Sets the container image to be used for running buildkit.
|
||||
- `network=NETMODE` - Sets the network mode for running the buildkit container.
|
||||
- `cgroup-parent=CGROUP` - Sets the cgroup parent of the buildkit container if docker is using the "cgroupfs" driver. Defaults to `/docker/buildx`.
|
||||
- `kubernetes`
|
||||
|
||||
#### `kubernetes` driver
|
||||
|
||||
- `image=IMAGE` - Sets the container image to be used for running buildkit.
|
||||
- `namespace=NS` - Sets the Kubernetes namespace. Defaults to the current namespace.
|
||||
- `replicas=N` - Sets the number of `Pod` replicas. Defaults to 1.
|
||||
|
@ -239,12 +263,20 @@ examples: |-
|
|||
- `requests.memory` - Sets the request memory value specified in bytes or with a valid suffix. Example `requests.memory=500Mi`, `requests.memory=4G`
|
||||
- `limits.cpu` - Sets the limit CPU value specified in units of Kubernetes CPU. Example `limits.cpu=100m`, `limits.cpu=2`
|
||||
- `limits.memory` - Sets the limit memory value specified in bytes or with a valid suffix. Example `limits.memory=500Mi`, `limits.memory=4G`
|
||||
- `nodeselector="label1=value1,label2=value2"` - Sets the kv of `Pod` nodeSelector. No Defaults. Example `nodeselector=kubernetes.io/arch=arm64`
|
||||
- `rootless=(true|false)` - Run the container as a non-root user without `securityContext.privileged`. [Using Ubuntu host kernel is recommended](https://github.com/moby/buildkit/blob/master/docs/rootless.md). Defaults to false.
|
||||
- `"nodeselector=label1=value1,label2=value2"` - Sets the kv of `Pod` nodeSelector. No Defaults. Example `nodeselector=kubernetes.io/arch=arm64`
|
||||
- `"tolerations=key=foo,value=bar;key=foo2,operator=exists;key=foo3,effect=NoSchedule"` - Sets the `Pod` tolerations. Accepts the same values as the kube manifest tolera>tions. Key-value pairs are separated by `,`, tolerations are separated by `;`. No Defaults. Example `tolerations=operator=exists`
|
||||
- `rootless=(true|false)` - Run the container as a non-root user without `securityContext.privileged`. Needs Kubernetes 1.19 or later. [Using Ubuntu host kernel is recommended](https://github.com/moby/buildkit/blob/master/docs/rootless.md). Defaults to false.
|
||||
- `loadbalance=(sticky|random)` - Load-balancing strategy. If set to "sticky", the pod is chosen using the hash of the context path. Defaults to "sticky"
|
||||
- `qemu.install=(true|false)` - Install QEMU emulation for multi platforms support.
|
||||
- `qemu.image=IMAGE` - Sets the QEMU emulation image. Defaults to `tonistiigi/binfmt:latest`
|
||||
|
||||
#### `remote` driver
|
||||
|
||||
- `key=KEY` - Sets the TLS client key.
|
||||
- `cert=CERT` - Sets the TLS client certificate to present to buildkitd.
|
||||
- `cacert=CACERT` - Sets the TLS certificate authority used for validation.
|
||||
- `servername=SERVER` - Sets the TLS server name to be used in requests (defaults to the endpoint hostname).
|
||||
|
||||
### Remove a node from a builder (--leave) {#leave}
|
||||
|
||||
The `--leave` flag changes the action of the command to remove a node from a
|
||||
|
|
|
@ -5,7 +5,7 @@ usage: docker buildx du
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
options:
|
||||
- option: filter
|
||||
- option: filter
|
||||
value_type: filter
|
||||
description: Provide filter values
|
||||
deprecated: false
|
||||
|
@ -14,7 +14,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: verbose
|
||||
- option: verbose
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Provide a more verbose output
|
||||
|
@ -25,7 +25,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -6,13 +6,13 @@ long: |-
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
cname:
|
||||
- docker buildx imagetools create
|
||||
- docker buildx imagetools inspect
|
||||
- docker buildx imagetools create
|
||||
- docker buildx imagetools inspect
|
||||
clink:
|
||||
- docker_buildx_imagetools_create.yaml
|
||||
- docker_buildx_imagetools_inspect.yaml
|
||||
- docker_buildx_imagetools_create.yaml
|
||||
- docker_buildx_imagetools_inspect.yaml
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -9,7 +9,7 @@ usage: docker buildx imagetools create [OPTIONS] [SOURCE] [SOURCE...]
|
|||
pname: docker buildx imagetools
|
||||
plink: docker_buildx_imagetools.yaml
|
||||
options:
|
||||
- option: append
|
||||
- option: append
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Append to existing manifest
|
||||
|
@ -20,7 +20,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: dry-run
|
||||
- option: dry-run
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Show final image instead of pushing
|
||||
|
@ -31,7 +31,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: file
|
||||
- option: file
|
||||
shorthand: f
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
|
@ -43,7 +43,18 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tag
|
||||
- option: progress
|
||||
value_type: string
|
||||
default_value: auto
|
||||
description: |
|
||||
Set type of progress output (`auto`, `plain`, `tty`). Use plain to show container output
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tag
|
||||
shorthand: t
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
|
@ -56,7 +67,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -42,7 +42,7 @@ usage: docker buildx imagetools inspect [OPTIONS] NAME
|
|||
pname: docker buildx imagetools
|
||||
plink: docker_buildx_imagetools.yaml
|
||||
options:
|
||||
- option: format
|
||||
- option: format
|
||||
value_type: string
|
||||
default_value: '`{{.Manifest}}`'
|
||||
description: Format the output using the given Go template
|
||||
|
@ -53,7 +53,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: raw
|
||||
- option: raw
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Show original, unformatted JSON manifest
|
||||
|
@ -65,7 +65,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -5,7 +5,7 @@ usage: docker buildx inspect [NAME]
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
options:
|
||||
- option: bootstrap
|
||||
- option: bootstrap
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Ensure builder has booted before inspecting
|
||||
|
@ -17,7 +17,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
@ -48,6 +48,10 @@ examples: |-
|
|||
The following example shows information about a builder instance named
|
||||
`elated_tesla`:
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> Asterisk `*` next to node build platform(s) indicate they had been set manually during `buildx create`. Otherwise, it had been autodetected.
|
||||
|
||||
```console
|
||||
$ docker buildx inspect elated_tesla
|
||||
|
||||
|
@ -58,12 +62,14 @@ examples: |-
|
|||
Name: elated_tesla0
|
||||
Endpoint: unix:///var/run/docker.sock
|
||||
Status: running
|
||||
Buildkit: v0.10.3
|
||||
Platforms: linux/amd64
|
||||
|
||||
Name: elated_tesla1
|
||||
Endpoint: ssh://ubuntu@1.2.3.4
|
||||
Status: running
|
||||
Platforms: linux/arm64, linux/arm/v7, linux/arm/v6
|
||||
Buildkit: v0.10.3
|
||||
Platforms: linux/arm64*, linux/arm/v7, linux/arm/v6
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
|
|
|
@ -5,7 +5,7 @@ usage: docker buildx install
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
deprecated: false
|
||||
|
|
|
@ -5,13 +5,12 @@ long: |-
|
|||
|
||||
```console
|
||||
$ docker buildx ls
|
||||
|
||||
NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS
|
||||
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
|
||||
elated_tesla * docker-container
|
||||
elated_tesla0 unix:///var/run/docker.sock running linux/amd64
|
||||
elated_tesla1 ssh://ubuntu@1.2.3.4 running linux/arm64*, linux/arm/v7, linux/arm/v6
|
||||
elated_tesla0 unix:///var/run/docker.sock running v0.10.3 linux/amd64
|
||||
elated_tesla1 ssh://ubuntu@1.2.3.4 running v0.10.3 linux/arm64*, linux/arm/v7, linux/arm/v6
|
||||
default docker
|
||||
default default running linux/amd64
|
||||
default default running 20.10.14 linux/amd64
|
||||
```
|
||||
|
||||
Each builder has one or more nodes associated with it. The current builder's
|
||||
|
@ -21,7 +20,7 @@ usage: docker buildx ls
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
deprecated: false
|
||||
|
|
|
@ -1,22 +1,39 @@
|
|||
command: docker buildx prune
|
||||
short: Remove build cache
|
||||
long: Remove build cache
|
||||
long: |-
|
||||
Clears the build cache of the selected builder.
|
||||
|
||||
You can finely control what cache data is kept using:
|
||||
|
||||
- The `--filter=until=<duration>` flag to keep images that have been used in
|
||||
the last `<duration>` time.
|
||||
|
||||
`<duration>` is a duration string, e.g. `24h` or `2h30m`, with allowable
|
||||
units of `(h)ours`, `(m)inutes` and `(s)econds`.
|
||||
|
||||
- The `--keep-storage=<size>` flag to keep `<size>` bytes of data in the cache.
|
||||
|
||||
`<size>` is a human-readable memory string, e.g. `128mb`, `2gb`, etc. Units
|
||||
are case-insensitive.
|
||||
|
||||
- The `--all` flag to allow clearing internal helper images and frontend images
|
||||
set using the `#syntax=` directive or the `BUILDKIT_SYNTAX` build argument.
|
||||
usage: docker buildx prune
|
||||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
options:
|
||||
- option: all
|
||||
- option: all
|
||||
shorthand: a
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Remove all unused images, not just dangling ones
|
||||
description: Include internal/frontend images
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: filter
|
||||
- option: filter
|
||||
value_type: filter
|
||||
description: Provide filter values (e.g., `until=24h`)
|
||||
deprecated: false
|
||||
|
@ -25,7 +42,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: force
|
||||
- option: force
|
||||
shorthand: f
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
@ -36,7 +53,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: keep-storage
|
||||
- option: keep-storage
|
||||
value_type: bytes
|
||||
default_value: "0"
|
||||
description: Amount of disk space to keep for cache
|
||||
|
@ -46,7 +63,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: verbose
|
||||
- option: verbose
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Provide a more verbose output
|
||||
|
@ -57,7 +74,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -7,7 +7,7 @@ usage: docker buildx rm [NAME]
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
options:
|
||||
- option: all-inactive
|
||||
- option: all-inactive
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Remove all inactive builders
|
||||
|
@ -18,7 +18,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: force
|
||||
- option: force
|
||||
shorthand: f
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
@ -30,7 +30,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: keep-daemon
|
||||
- option: keep-daemon
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Keep the buildkitd daemon running
|
||||
|
@ -41,7 +41,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: keep-state
|
||||
- option: keep-state
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Keep BuildKit state
|
||||
|
@ -53,7 +53,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -7,7 +7,7 @@ usage: docker buildx stop [NAME]
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -5,7 +5,7 @@ usage: docker buildx uninstall
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
deprecated: false
|
||||
|
|
|
@ -8,7 +8,7 @@ usage: docker buildx use [OPTIONS] NAME
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
options:
|
||||
- option: default
|
||||
- option: default
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Set builder as default for current context
|
||||
|
@ -18,7 +18,7 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: global
|
||||
- option: global
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Builder persists context changes
|
||||
|
@ -29,7 +29,7 @@ options:
|
|||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
details_url: '#builder'
|
||||
|
|
|
@ -11,7 +11,7 @@ usage: docker buildx version
|
|||
pname: docker buildx
|
||||
plink: docker_buildx.yaml
|
||||
inherited_options:
|
||||
- option: builder
|
||||
- option: builder
|
||||
value_type: string
|
||||
description: Override the configured builder instance
|
||||
deprecated: false
|
||||
|
|
Loading…
Reference in New Issue