Allow to set default progress through env var

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
pull/504/head
CrazyMax 4 years ago
parent 57b875a955
commit d05504c50f
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -311,7 +311,13 @@ 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")
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")
}

Loading…
Cancel
Save