From 877fac48643772d3549b32d50b6d5f560770beb3 Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Thu, 30 Jul 2020 14:09:06 -0700 Subject: Allocate a pseudo-tty for exec. Otherwise Ctrl-C will kill the 'docker exec' as opposed to killing the bazel command being run inside the container. PiperOrigin-RevId: 324079339 --- tools/bazel.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/bazel.mk') diff --git a/tools/bazel.mk b/tools/bazel.mk index 88faa0190..82fe11a03 100644 --- a/tools/bazel.mk +++ b/tools/bazel.mk @@ -48,7 +48,10 @@ FULL_DOCKER_RUN_OPTIONS += -v "$(BAZEL_CACHE):$(BAZEL_CACHE)" FULL_DOCKER_RUN_OPTIONS += -v "$(GCLOUD_CONFIG):$(GCLOUD_CONFIG)" FULL_DOCKER_RUN_OPTIONS += -v "/tmp:/tmp" FULL_DOCKER_EXEC_OPTIONS := --user $(UID):$(GID) -FULL_DOCKER_EXEC_OPTIONS += -i +FULL_DOCKER_EXEC_OPTIONS += --interactive +ifeq (true,$(shell [[ -t 0 ]] && echo true)) +FULL_DOCKER_EXEC_OPTIONS += --tty +endif # Add docker passthrough options. ifneq ($(DOCKER_PRIVILEGED),) -- cgit v1.2.3