mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
Duplicated progress env var
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
7d312eaa0a
commit
3d1ab82dc6
@ -352,13 +352,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
|
|||||||
|
|
||||||
func commonBuildFlags(options *commonOptions, flags *pflag.FlagSet) {
|
func commonBuildFlags(options *commonOptions, flags *pflag.FlagSet) {
|
||||||
options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image")
|
options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image")
|
||||||
|
flags.StringVar(&options.progress, "progress", "auto", "Set type of progress output (auto, plain, tty). Use plain to show container output")
|
||||||
defaultProgress, ok := os.LookupEnv("BUILDX_PROGRESS_DEFAULT")
|
|
||||||
if !ok {
|
|
||||||
defaultProgress = "auto"
|
|
||||||
}
|
|
||||||
flags.StringVar(&options.progress, "progress", defaultProgress, "Set type of progress output (auto, plain, tty). Use plain to show container output")
|
|
||||||
|
|
||||||
options.pull = flags.Bool("pull", false, "Always attempt to pull a newer version of the image")
|
options.pull = flags.Bool("pull", false, "Always attempt to pull a newer version of the image")
|
||||||
flags.StringVar(&options.metadataFile, "metadata-file", "", "Write build result metadata to the file")
|
flags.StringVar(&options.metadataFile, "metadata-file", "", "Write build result metadata to the file")
|
||||||
}
|
}
|
||||||
|
@ -115,8 +115,10 @@ $ docker buildx bake -f docker-bake.hcl --print db
|
|||||||
|
|
||||||
### <a name="progress"></a> Set type of progress output (--progress)
|
### <a name="progress"></a> Set type of progress output (--progress)
|
||||||
|
|
||||||
Same as `build --progress`. Set type of progress output (auto, plain, tty). Use
|
Same as [`build --progress`](buildx_build.md#progress). Set type of progress
|
||||||
plain to show container output (default "auto").
|
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.
|
||||||
|
|
||||||
The following example uses `plain` output during the build:
|
The following example uses `plain` output during the build:
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ Start a build
|
|||||||
| `--no-cache` | Do not use cache when building the image |
|
| `--no-cache` | Do not use cache when building the image |
|
||||||
| [`-o`](#output), [`--output stringArray`](#output) | Output destination (format: type=local,dest=path) |
|
| [`-o`](#output), [`--output stringArray`](#output) | Output destination (format: type=local,dest=path) |
|
||||||
| [`--platform stringArray`](#platform) | Set target platform for build |
|
| [`--platform stringArray`](#platform) | Set target platform for build |
|
||||||
| `--progress string` | Set type of progress output (auto, plain, tty). Use plain to show container output |
|
| [`--progress string`](#progress) | Set type of progress output (auto, plain, tty). Use plain to show container output |
|
||||||
| `--pull` | Always attempt to pull a newer version of the image |
|
| `--pull` | Always attempt to pull a newer version of the image |
|
||||||
| [`--push`](#push) | Shorthand for --output=type=registry |
|
| [`--push`](#push) | Shorthand for --output=type=registry |
|
||||||
| `--secret stringArray` | Secret file to expose to the build: id=mysecret,src=/local/secret |
|
| `--secret stringArray` | Secret file to expose to the build: id=mysecret,src=/local/secret |
|
||||||
@ -93,6 +93,33 @@ $ docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 .
|
|||||||
$ docker buildx build --platform=darwin .
|
$ docker buildx build --platform=darwin .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### <a name="progress"></a> Set type of progress output (--progress)
|
||||||
|
|
||||||
|
```
|
||||||
|
--progress=VALUE
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
The following example uses `plain` output during the build:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ docker buildx build --load --progress=plain .
|
||||||
|
|
||||||
|
#1 [internal] load build definition from Dockerfile
|
||||||
|
#1 transferring dockerfile: 227B 0.0s done
|
||||||
|
#1 DONE 0.1s
|
||||||
|
|
||||||
|
#2 [internal] load .dockerignore
|
||||||
|
#2 transferring context: 129B 0.0s done
|
||||||
|
#2 DONE 0.0s
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
### <a name="output"></a> Set the export action for the build result (-o, --output)
|
### <a name="output"></a> Set the export action for the build result (-o, --output)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user