aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBrian Goff <cpuguy83@gmail.com>2019-10-08 11:17:15 -0700
committerBrian Goff <cpuguy83@gmail.com>2019-10-10 11:47:23 -0700
commit1c82d1190888f05836c550c85e4e8daedae2a813 (patch)
tree13a17bbe884711af165059fde7fe4fa7845f20c2 /Makefile
parentb3be2802d417d05813d6140b5bc177043288db24 (diff)
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c7c46cd620..733ffaafc9 100644
--- a/Makefile
+++ b/Makefile
@@ -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