From 9638d1a4fb2e67b04da21db6fff420af93ace046 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 14 Oct 2019 14:58:41 +0200 Subject: [PATCH] make buildx: remove BUILDX_DOCKERFILE make var This simplifies the makefile a bit, while preserving the functionality. Using a non-existing Dockerfile to demonstrate: make buildx Successfully tagged moby-buildx:latest 92059305df7371f8b5b3638d4d405d49ff909031a7bc6d2f515cb0a0df03c2f4 github.com/docker/buildx v0.3.0 c967f1d make BUILDX_DOCKERFILE=foo buildx BUILDX_DOCKERFILE=foo buildx unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/sebastiaan/go/src/github.com/docker/docker/foo: no such file or directory Signed-off-by: Sebastiaan van Stijn --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 95f0a1edee..2e89aa8240 100644 --- a/Makefile +++ b/Makefile @@ -252,11 +252,10 @@ else buildx: endif -bundles/buildx: BUILDX_DOCKERFILE ?= Dockerfile.buildx bundles/buildx: bundles ## build buildx CLI tool # This intetionally is not using the `--output` flag from the docker CLI which is a buildkit option # The idea here being that if buildx is being used, it's because buildkit is not supported natively - docker build -f $(BUILDX_DOCKERFILE) -t "moby-buildx:$${BUILDX_COMMIT:-latest}" \ + docker build -f $${BUILDX_DOCKERFILE:-Dockerfile.buildx} -t "moby-buildx:$${BUILDX_COMMIT:-latest}" \ --build-arg BUILDX_COMMIT \ --build-arg BUILDX_REPO \ --build-arg GOOS=$$(if [ -n "$(GOOS)" ]; then echo $(GOOS); else go env GOHOSTOS || uname | awk '{print tolower($$0)}' || true; fi) \