Skip to content

Commit

Permalink
Merge pull request docker#1863 from tiborvass/buildx-backports
Browse files Browse the repository at this point in the history
buildx backports: BUILDKIT_PROGRESS env + build --platform local
  • Loading branch information
thaJeztah authored May 9, 2019
2 parents d88565d + daca70d commit 0b0c45d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cli/command/image/build_buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
defer func() { // make sure the Status ends cleanly on build errors
s.Close()
Expand Down

0 comments on commit 0b0c45d

Please sign in to comment.