Fix trick for make BINDDIR=. shell and COPY .

This was inadvertently removed when updating the Dockerfile for buildkit
specific features.

Trick selects a different build target depending on if the source is
going to be bind-mounted in anyway, which prevents the need to copy the
whole source tree to the builder.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2019-10-08 11:17:15 -07:00
parent b3be2802d4
commit 1c82d11908
2 changed files with 10 additions and 4 deletions

View File

@@ -187,7 +187,11 @@ install: ## install the linux binaries
run: build ## run the docker daemon in a container
$(DOCKER_RUN_DOCKER) sh -c "KEEPBUNDLE=1 hack/make.sh install-binary run"
ifeq ($(BIND_DIR), .)
shell: DOCKER_BUILD_ARGS += --target=dev
else
shell: DOCKER_BUILD_ARGS += --target=final
endif
shell: BUILDX_BUILD_EXTRA_OPTS += --load
shell: build ## start a shell inside the build env
$(DOCKER_RUN_DOCKER) bash