Skip to content

Commit 92b646d

Browse files
authored
Merge pull request #5818 from afbjorklund/docker-entrypoint
Don't use bash as the entrypoint for docker
2 parents 83e9bfd + c668631 commit 92b646d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ HYPERKIT_LDFLAGS := -X k8s.io/minikube/pkg/drivers/hyperkit.version=$(VERSION) -
117117

118118
# $(call DOCKER, image, command)
119119
define DOCKER
120-
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)'
120+
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)'
121121
endef
122122

123123
ifeq ($(BUILD_IN_DOCKER),y)
@@ -435,7 +435,10 @@ out/minikube-installer.exe: out/minikube-windows-amd64.exe
435435

436436
out/docker-machine-driver-hyperkit:
437437
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
438-
$(call DOCKER,$(HYPERKIT_BUILD_IMAGE),CC=o64-clang CXX=o64-clang++ /usr/bin/make $@)
438+
docker run --rm -e GOCACHE=/app/.cache -e IN_DOCKER=1 \
439+
--user $(shell id -u):$(shell id -g) -w /app \
440+
-v $(PWD):/app -v $(GOPATH):/go --init --entrypoint "" \
441+
$(HYPERKIT_BUILD_IMAGE) /bin/bash -c 'CC=o64-clang CXX=o64-clang++ /usr/bin/make $@'
439442
else
440443
GOOS=darwin CGO_ENABLED=1 go build \
441444
-ldflags="$(HYPERKIT_LDFLAGS)" \
@@ -444,7 +447,7 @@ endif
444447

445448
hyperkit_in_docker:
446449
rm -f out/docker-machine-driver-hyperkit
447-
$(call DOCKER,$(HYPERKIT_BUILD_IMAGE),CC=o64-clang CXX=o64-clang++ /usr/bin/make out/docker-machine-driver-hyperkit)
450+
$(MAKE) MINIKUBE_BUILD_IN_DOCKER=y out/docker-machine-driver-hyperkit
448451

449452
.PHONY: install-hyperkit-driver
450453
install-hyperkit-driver: out/docker-machine-driver-hyperkit ## Install hyperkit to local machine

0 commit comments

Comments
 (0)