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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-14 14:58:41 +02:00
parent 37fe68f5d6
commit 9638d1a4fb
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 2 deletions

View File

@ -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) \