Skip to content

Commit bc09440

Browse files
authored
Merge pull request #714 from hieblmi/speed-up-docker
Speed up docker runs
2 parents 0d26875 + 0babeee commit bc09440

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ ifneq ($(workers),)
3434
LINT_WORKERS = --concurrency=$(workers)
3535
endif
3636

37-
DOCKER_TOOLS = docker run -v $$(pwd):/build loop-tools
37+
DOCKER_TOOLS = docker run \
38+
--rm \
39+
-v $(shell bash -c "go env GOCACHE || (mkdir -p /tmp/go-cache; echo /tmp/go-cache)"):/tmp/build/.cache \
40+
-v $(shell bash -c "go env GOMODCACHE || (mkdir -p /tmp/go-modcache; echo /tmp/go-modcache)"):/tmp/build/.modcache \
41+
-v $$(pwd):/build loop-tools
3842

3943
GREEN := "\\033[0;32m"
4044
NC := "\\033[0m"

0 commit comments

Comments
 (0)