Skip to content

Commit

Permalink
Duplicated progress env var
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jul 25, 2021
1 parent 7d312ea commit 3d1ab82
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
8 changes: 1 addition & 7 deletions commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {

func commonBuildFlags(options *commonOptions, flags *pflag.FlagSet) {
options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image")

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")

flags.StringVar(&options.progress, "progress", "auto", "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")
flags.StringVar(&options.metadataFile, "metadata-file", "", "Write build result metadata to the file")
}
Expand Down
6 changes: 4 additions & 2 deletions docs/reference/buildx_bake.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ $ docker buildx bake -f docker-bake.hcl --print db

### <a name="progress"></a> Set type of progress output (--progress)

Same as `build --progress`. Set type of progress output (auto, plain, tty). Use
plain to show container output (default "auto").
Same as [`build --progress`](buildx_build.md#progress). 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:

Expand Down
29 changes: 28 additions & 1 deletion docs/reference/buildx_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Start a build
| `--no-cache` | Do not use cache when building the image |
| [`-o`](#output), [`--output stringArray`](#output) | Output destination (format: type=local,dest=path) |
| [`--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 |
| [`--push`](#push) | Shorthand for --output=type=registry |
| `--secret stringArray` | Secret file to expose to the build: id=mysecret,src=/local/secret |
Expand Down Expand Up @@ -93,6 +93,33 @@ $ docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 .
$ 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)

```
Expand Down

0 comments on commit 3d1ab82

Please sign in to comment.