diff --git a/Makefile b/Makefile index cd78401abaea..e789d4ad8754 100644 --- a/Makefile +++ b/Makefile @@ -910,10 +910,11 @@ release-binary: $(RELEASE_DIR) -e CGO_ENABLED=0 \ -e GOOS=$(GOOS) \ -e GOARCH=$(GOARCH) \ + -e GOCACHE=/tmp/ \ + --user $$(id -u):$$(id -g) \ -v "$$(pwd):/workspace$(DOCKER_VOL_OPTS)" \ -w /workspace \ golang:$(GO_VERSION) \ - git config --global --add safe.directory /workspace; \ go build -a -trimpath -ldflags "$(LDFLAGS) -extldflags '-static'" \ -o $(RELEASE_DIR)/$(notdir $(RELEASE_BINARY)) $(BUILD_PATH)