Skip to content

Commit 854f9aa

Browse files
committed
chore(Makefile): cache crates when running in docker
1 parent f82389d commit 854f9aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,13 @@ docker-builder:
165165
.PHONY: in-docker
166166
in-docker: docker-builder
167167
@# Run the given make target inside Docker
168+
mkdir -p $(CACHE_DIR)/home
168169
docker run --rm \
169170
-v $(PWD):/src \
171+
-v $(PWD)/$(CACHE_DIR)/home:/home/build \
170172
--workdir /src \
171173
-e HOME=/home/build \
174+
-e CARGO_HOME=/home/build/.cargo \
172175
-e TARGET_ARCH=$(TARGET_ARCH) \
173176
-e PKG_CONFIG_SYSROOT_DIR="/usr/$(ARCH)-linux-gnu" \
174177
--user $(shell id -u):$(shell id -g) \

0 commit comments

Comments
 (0)