From 22551efae48446b0d3ae9f8bb54de208737356e3 Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Thu, 2 Mar 2023 14:39:44 +0000 Subject: [PATCH] Replace fixed build uid with command --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)