Merge pull request #1863 from tiborvass/buildx-backports

buildx backports: BUILDKIT_PROGRESS env + build --platform local
This commit is contained in:
Sebastiaan van Stijn 2019-05-09 15:23:13 -07:00 committed by GitHub
commit 0b0c45dd11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
"strings" "strings"
"github.com/containerd/console" "github.com/containerd/console"
"github.com/containerd/containerd/platforms"
"github.com/docker/cli/cli" "github.com/docker/cli/cli"
"github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/image/build" "github.com/docker/cli/cli/command/image/build"
@ -215,6 +216,14 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
}) })
} }
if v := os.Getenv("BUILDKIT_PROGRESS"); v != "" && options.progress == "auto" {
options.progress = v
}
if strings.EqualFold(options.platform, "local") {
options.platform = platforms.DefaultString()
}
eg.Go(func() error { eg.Go(func() error {
defer func() { // make sure the Status ends cleanly on build errors defer func() { // make sure the Status ends cleanly on build errors
s.Close() s.Close()