Run Go build as current user via -u flag

Remove complicated workaround in build.sh
This commit is contained in:
Bryan Boreham
2020-12-29 11:24:23 +00:00
parent de60ebd37f
commit 085bd40be8
2 changed files with 2 additions and 11 deletions

View File

@@ -91,6 +91,7 @@ $(SCOPE_EXE) $(RUNSVINIT) lint tests shell prog/staticui/staticui.go prog/extern
$(SUDO) docker run $(RM) $(RUN_FLAGS) \
-v $(shell pwd):/go/src/github.com/weaveworks/scope \
-v $(shell pwd)/.pkg:/go/pkg \
-u $(shell id -u ${USER}):$(shell id -g ${USER}) \
--net=host \
-e GOARCH -e GOOS -e CIRCLECI -e CIRCLE_BUILD_NUM -e CIRCLE_NODE_TOTAL \
-e CIRCLE_NODE_INDEX -e COVERDIR -e SLOW -e TESTDIRS \