From 8adcedd658eb4531372210ad0112b679f7ae9cfb Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Tue, 7 May 2019 22:15:54 +0000 Subject: [PATCH 1/2] build: honor BUILDKIT_PROGRESS env config Signed-off-by: Tibor Vass --- cli/command/image/build_buildkit.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/command/image/build_buildkit.go b/cli/command/image/build_buildkit.go index c7344d4545..6c6d06ba8a 100644 --- a/cli/command/image/build_buildkit.go +++ b/cli/command/image/build_buildkit.go @@ -215,6 +215,10 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error { }) } + if v := os.Getenv("BUILDKIT_PROGRESS"); v != "" && options.progress == "auto" { + options.progress = v + } + eg.Go(func() error { defer func() { // make sure the Status ends cleanly on build errors s.Close() From daca70d820d1143fa6048ca7f1d20aea72830e79 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Tue, 7 May 2019 22:25:40 +0000 Subject: [PATCH 2/2] build: add --platform local Signed-off-by: Tibor Vass --- cli/command/image/build_buildkit.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/command/image/build_buildkit.go b/cli/command/image/build_buildkit.go index 6c6d06ba8a..f9cae0ceb7 100644 --- a/cli/command/image/build_buildkit.go +++ b/cli/command/image/build_buildkit.go @@ -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()