mirror of https://github.com/docker/buildx.git
Allow default for --output flag.
Signed-off-by: sudipto baral <sudiptobaral.me@gmail.com>
This commit is contained in:
parent
5c5bc510ac
commit
ac35c4ee0c
|
@ -585,6 +585,10 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions, debugConfig *debug.D
|
|||
if v := os.Getenv("DOCKER_DEFAULT_PLATFORM"); v != "" {
|
||||
platformsDefault = []string{v}
|
||||
}
|
||||
var outputDefault []string
|
||||
if v := os.Getenv("DOCKER_DEFAULT_OUTPUT"); v != "" {
|
||||
outputDefault = []string{v}
|
||||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
|
||||
|
@ -616,7 +620,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions, debugConfig *debug.D
|
|||
|
||||
flags.StringArrayVar(&options.noCacheFilter, "no-cache-filter", []string{}, "Do not cache specified stages")
|
||||
|
||||
flags.StringArrayVarP(&options.outputs, "output", "o", []string{}, `Output destination (format: "type=local,dest=path")`)
|
||||
flags.StringArrayVarP(&options.outputs, "output", "o", outputDefault, `Output destination (format: "type=local,dest=path")`)
|
||||
|
||||
flags.StringArrayVar(&options.platforms, "platform", platformsDefault, "Set target platform for build")
|
||||
|
||||
|
|
Loading…
Reference in New Issue