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.
This commit is contained in:
Bryan Boreham
2020-12-29 15:43:03 +00:00
parent 894f35e52a
commit 440892516f
2 changed files with 3 additions and 0 deletions

1
.gitignore vendored
View File

@@ -64,6 +64,7 @@ prog/staticui/staticui.go
prog/externalui/externalui.go
client/build-pkg
client/bundle
client/.yarnrc
# Website
site-build

View File

@@ -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)