Skip to content

Commit

Permalink
Don't use bash as the entrypoint for docker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
afbjorklund committed Nov 2, 2019
1 parent 3322c50 commit 0173964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ HYPERKIT_LDFLAGS := -X k8s.io/minikube/pkg/drivers/hyperkit.version=$(VERSION) -

# $(call DOCKER, image, command)
define DOCKER
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)'
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)'
endef

ifeq ($(BUILD_IN_DOCKER),y)
Expand Down

0 comments on commit 0173964

Please sign in to comment.