From 695034153a83c15fa86631054872cb07532ec561 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Thu, 23 May 2019 20:44:55 +0000 Subject: [PATCH] cmd/buildx: add empty by default experimental variable To guard this Docker CLI plugin with docker's experimental CLI config, buildx needs to be built with `go build -ldflags "-X main.experimental=1"` Signed-off-by: Tibor Vass --- cmd/buildx/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/buildx/main.go b/cmd/buildx/main.go index eec91019..632c928f 100644 --- a/cmd/buildx/main.go +++ b/cmd/buildx/main.go @@ -16,6 +16,8 @@ import ( _ "github.com/docker/buildx/driver/docker-container" ) +var experimental string + func main() { if os.Getenv("DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND") == "" { if len(os.Args) < 2 || os.Args[1] != manager.MetadataSubcommandName { @@ -41,5 +43,6 @@ func main() { SchemaVersion: "0.1.0", Vendor: "Docker Inc.", Version: version.Version, + Experimental: experimental != "", }) }