From 486c4cc7e94b30ec7a335242ded18ebb5458927a Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 29 Dec 2020 15:43:03 +0000 Subject: [PATCH] Set HOME for build containers Otherwise it's blank on Apple M1 platform (at least) and builds fail Now we have to git-ignore .yarnrc file, which is created in the HOME dir. --- .gitignore | 1 + Makefile | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 13ab34672..ea8db4a17 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ prog/staticui/staticui.go prog/externalui/externalui.go client/build-pkg client/bundle +client/.yarnrc # Website site-build diff --git a/Makefile b/Makefile index bc061d907..0a7b209ea 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,7 @@ $(SCOPE_EXE) $(RUNSVINIT) lint tests shell prog/staticui/staticui.go prog/extern -v $(shell pwd)/.cache:/go/cache:delegated,z \ -u $(shell id -u ${USER}):$(shell id -g ${USER}) \ --net=host \ + -e HOME=/go/src/github.com/weaveworks/scope \ -e GOARCH -e GOOS -e CIRCLECI -e CIRCLE_BUILD_NUM -e CIRCLE_NODE_TOTAL \ -e CIRCLE_NODE_INDEX -e COVERDIR -e SLOW -e TESTDIRS \ $(SCOPE_BACKEND_BUILD_IMAGE) SCOPE_VERSION=$(SCOPE_VERSION) CODECGEN_UID=$(CODECGEN_UID) $@ @@ -142,6 +143,7 @@ SCOPE_UI_BUILD_CMD=$(SUDO) docker run $(RM) $(RUN_FLAGS) \ -v $(shell pwd)/client:/home/weave/scope/client:delegated,z \ -v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules:delegated,z \ -w /home/weave/scope/client \ + -e HOME=/home/weave/scope/client \ -u $(shell id -u ${USER}):$(shell id -g ${USER}) $(SCOPE_UI_TOOLCHAIN_UPTODATE): client/yarn.lock $(SCOPE_UI_BUILD_UPTODATE)