mirror of https://github.com/docker/cli.git
build: add --platform local
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
8adcedd658
commit
daca70d820
|
@ -14,6 +14,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/containerd/console"
|
||||
"github.com/containerd/containerd/platforms"
|
||||
"github.com/docker/cli/cli"
|
||||
"github.com/docker/cli/cli/command"
|
||||
"github.com/docker/cli/cli/command/image/build"
|
||||
|
@ -219,6 +220,10 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
|
|||
options.progress = v
|
||||
}
|
||||
|
||||
if strings.EqualFold(options.platform, "local") {
|
||||
options.platform = platforms.DefaultString()
|
||||
}
|
||||
|
||||
eg.Go(func() error {
|
||||
defer func() { // make sure the Status ends cleanly on build errors
|
||||
s.Close()
|
||||
|
|
Loading…
Reference in New Issue