mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
vendor: github.com/docker/buildx v0.32.0
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
github-actions[bot]
parent
bae49a283e
commit
eb8fa131d6
@@ -1026,13 +1026,37 @@ examples: |-
|
||||
### Specify a Dockerfile (-f, --file) {#file}
|
||||
|
||||
```console
|
||||
$ docker buildx build -f <filepath> .
|
||||
$ docker buildx build -f [PATH|URL|-] .
|
||||
```
|
||||
|
||||
Specifies the filepath of the Dockerfile to use.
|
||||
Specifies the location of the Dockerfile to use.
|
||||
If unspecified, a file named `Dockerfile` at the root of the build context is used by default.
|
||||
|
||||
To read a Dockerfile from stdin, you can use `-` as the argument for `--file`.
|
||||
The supported inputs formats are:
|
||||
|
||||
- [`Local file path`](#local-file-path)
|
||||
- [`Remote URL`](#remote-url)
|
||||
- [`Standard input`](#standard-input)
|
||||
|
||||
#### Local file path
|
||||
|
||||
To specify a path to a local Dockerfile:
|
||||
|
||||
```console
|
||||
$ docker buildx build -f path/to/Dockerfile .
|
||||
```
|
||||
|
||||
#### Remote URL
|
||||
|
||||
To specify a URL to a remote Dockerfile:
|
||||
|
||||
```console
|
||||
$ docker buildx build -f https://raw.githubusercontent.com/docker/buildx/refs/tags/v0.29.0/Dockerfile .
|
||||
```
|
||||
|
||||
#### Standard input
|
||||
|
||||
To read a Dockerfile from stdin, use `-` as the argument:
|
||||
|
||||
```console
|
||||
$ cat Dockerfile | docker buildx build -f - .
|
||||
|
||||
@@ -136,6 +136,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: timeout
|
||||
value_type: duration
|
||||
default_value: 20s
|
||||
description: Override the default timeout for loading builder status
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: use
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
||||
@@ -25,6 +25,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: timeout
|
||||
value_type: duration
|
||||
default_value: 20s
|
||||
description: Override the default timeout for loading builder status
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: verbose
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
||||
@@ -59,6 +59,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: metadata-file
|
||||
value_type: string
|
||||
description: Write create result metadata to a file
|
||||
details_url: '#metadata-file'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: platform
|
||||
shorthand: p
|
||||
value_type: stringArray
|
||||
@@ -188,6 +198,28 @@ examples: |-
|
||||
|
||||
The supported fields for the descriptor are defined in [OCI spec](https://github.com/opencontainers/image-spec/blob/master/descriptor.md#properties) .
|
||||
|
||||
### Write create result metadata to a file (--metadata-file) {#metadata-file}
|
||||
|
||||
To output metadata such as the image digest, pass the `--metadata-file` flag.
|
||||
The metadata will be written as a JSON object to the specified file. The
|
||||
directory of the specified file must already exist and be writable.
|
||||
|
||||
```console
|
||||
$ docker buildx imagetools create -t user/app:latest -f image1 -f image2 --metadata-file metadata.json
|
||||
$ cat metadata.json
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"containerimage.descriptor": {
|
||||
"mediaType": "application/vnd.oci.image.index.v1+json",
|
||||
"digest": "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3",
|
||||
"size": 4654
|
||||
},
|
||||
"image.name": "docker.io/user/app"
|
||||
}
|
||||
```
|
||||
|
||||
### Set reference for new image (-t, --tag) {#tag}
|
||||
|
||||
```text
|
||||
|
||||
@@ -16,6 +16,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: timeout
|
||||
value_type: duration
|
||||
default_value: 20s
|
||||
description: Override the default timeout for loading builder status
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
value_type: string
|
||||
|
||||
@@ -49,6 +49,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: timeout
|
||||
value_type: duration
|
||||
default_value: 20s
|
||||
description: Override the default timeout for loading builder status
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: debug
|
||||
shorthand: D
|
||||
|
||||
@@ -81,6 +81,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: timeout
|
||||
value_type: duration
|
||||
default_value: 20s
|
||||
description: Override the default timeout for loading builder status
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: verbose
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
||||
@@ -52,6 +52,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: timeout
|
||||
value_type: duration
|
||||
default_value: 20s
|
||||
description: Override the default timeout for loading builder status
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
inherited_options:
|
||||
- option: builder
|
||||
value_type: string
|
||||
|
||||
Reference in New Issue
Block a user