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>
... | ... |
@@ -252,11 +252,10 @@ else |
252 | 252 |
buildx: |
253 | 253 |
endif |
254 | 254 |
|
255 |
-bundles/buildx: BUILDX_DOCKERFILE ?= Dockerfile.buildx |
|
256 | 255 |
bundles/buildx: bundles ## build buildx CLI tool |
257 | 256 |
# This intetionally is not using the `--output` flag from the docker CLI which is a buildkit option |
258 | 257 |
# The idea here being that if buildx is being used, it's because buildkit is not supported natively |
259 |
- docker build -f $(BUILDX_DOCKERFILE) -t "moby-buildx:$${BUILDX_COMMIT:-latest}" \ |
|
258 |
+ docker build -f $${BUILDX_DOCKERFILE:-Dockerfile.buildx} -t "moby-buildx:$${BUILDX_COMMIT:-latest}" \ |
|
260 | 259 |
--build-arg BUILDX_COMMIT \ |
261 | 260 |
--build-arg BUILDX_REPO \ |
262 | 261 |
--build-arg GOOS=$$(if [ -n "$(GOOS)" ]; then echo $(GOOS); else go env GOHOSTOS || uname | awk '{print tolower($$0)}' || true; fi) \ |