1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Makefile: force using buildkit if USE_BUILDX is not set

Before this change:

```
unset DOCKER_BUILDKIT

make build
docker build  --build-arg=CROSS=false  -t "docker-dev:require-buildkit" -f "Dockerfile" .
Sending build context to Docker daemon  50.01MB
Error response from daemon: Dockerfile parse error line 17: Unknown flag: mount
make: *** [build] Error 1
```

After this change:

```
unset DOCKER_BUILDKIT

make build
docker build  --build-arg=CROSS=false  -t "docker-dev:require-buildkit" -f "Dockerfile" .
[+] Building 5.2s (71/71) FINISHED
 => [internal] load .dockerignore                                                                     0.1s
...
...
 => => exporting layers                                                                               0.9s
 => => writing image sha256:1ea4128a0e7f3bdee47de1675252609d9d6071e32da24a2aafee9fba96b2404b          0.0s
 => => naming to docker.io/library/docker-dev:require-buildkit                                        0.0s
...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-08 21:47:07 +02:00
parent dba8da8158
commit 1be2cc2568
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -7,6 +7,11 @@ DOCKER_BUILDX_CLI_PLUGIN_PATH ?= ~/.docker/cli-plugins/docker-buildx
BUILDX ?= $(shell if [ -x "$(DOCKER_BUILDX_CLI_PLUGIN_PATH)" ]; then echo $(DOCKER_BUILDX_CLI_PLUGIN_PATH); fi)
endif
ifndef USE_BUILDX
DOCKER_BUILDKIT := 1
export DOCKER_BUILDKIT
endif
BUILDX ?= bundles/buildx
DOCKER ?= docker