Skip to content

Commit 0173964

Browse files
committed
Don't use bash as the entrypoint for docker
The bash shell is not very good at playing init(1), let tini handle this instead by doing `docker run --init`. This makes it forward signals properly to e.g. make, and also reaps processes for long-running containers.
1 parent 3322c50 commit 0173964

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ HYPERKIT_LDFLAGS := -X k8s.io/minikube/pkg/drivers/hyperkit.version=$(VERSION) -
114114

115115
# $(call DOCKER, image, command)
116116
define DOCKER
117-
docker run --rm -e GOCACHE=/app/.cache -e IN_DOCKER=1 --user $(shell id -u):$(shell id -g) -w /app -v $(PWD):/app -v $(GOPATH):/go --entrypoint /bin/bash $(1) -c '$(2)'
117+
docker run --rm -e GOCACHE=/app/.cache -e IN_DOCKER=1 --user $(shell id -u):$(shell id -g) -w /app -v $(PWD):/app -v $(GOPATH):/go --init $(1) /bin/bash -c '$(2)'
118118
endef
119119

120120
ifeq ($(BUILD_IN_DOCKER),y)

0 commit comments

Comments
 (0)