Makefile: Honour BIND_DIR from the environment

Setting BIND_DIR in the environment, as in `env BIND_DIR= make
test-integration`, had no effect: the Makefile assigned BIND_DIR with
`:=`, which overrides environment variables, so the source tree stayed
bind-mounted.

This was inconsistent with other variables and was easy to overlook.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski committed 2026-09-25 15:27:30 +02:00
1 parent b513fc7d54
commit 8cdf2868b6
1 file changed
+1 -1
+1 -1
View File
@@ -85,7 +85,7 @@ DOCKER_ENVS := \
# to allow `make BIND_DIR=. shell` or `make BIND_DIR= test`
# (default to no bind mount if DOCKER_HOST is set)
# note: BINDDIR is supported for backwards-compatibility here
BIND_DIR := $(if $(BINDDIR),$(BINDDIR),$(if $(DOCKER_HOST),,.))
BIND_DIR ?= $(if $(BINDDIR),$(BINDDIR),$(if $(DOCKER_HOST),,.))
# DOCKER_MOUNT can be overridden, but use at your own risk!
ifndef DOCKER_MOUNT