Browse code

Enable buildkit for Makefile build target

This is set only if it is not already set.
This should give a little speedup to CI builds.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2019/03/10 11:27:26
Showing 1 changed files
... ...
@@ -134,9 +134,10 @@ binary: build ## build the linux binaries
134 134
 dynbinary: build ## build the linux dynbinaries
135 135
 	$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary
136 136
 
137
+build: DOCKER_BUILDKIT ?= 1
137 138
 build: bundles
138 139
 	$(warning The docker client CLI has moved to github.com/docker/cli. For a dev-test cycle involving the CLI, run:${\n} DOCKER_CLI_PATH=/host/path/to/cli/binary make shell ${\n} then change the cli and compile into a binary at the same location.${\n})
139
-	docker build ${BUILD_APT_MIRROR} ${DOCKER_BUILD_ARGS} ${DOCKER_BUILD_OPTS} -t "$(DOCKER_IMAGE)" -f "$(DOCKERFILE)" .
140
+	DOCKER_BUILDKIT="${DOCKER_BUILDKIT}" docker build ${BUILD_APT_MIRROR} ${DOCKER_BUILD_ARGS} ${DOCKER_BUILD_OPTS} -t "$(DOCKER_IMAGE)" -f "$(DOCKERFILE)" .
140 141
 
141 142
 bundles:
142 143
 	mkdir bundles