Skip to content

Commit 00e7700

Browse files
committed
fix(ci): add GOMODCACHE env var to fix permission denied error
- Add GOMODCACHE=/tmp/go-mod-cache to all docker run commands - Resolves permission denied error when creating modcache index dir
1 parent 9e1d749 commit 00e7700

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
@@ -35,6 +35,7 @@ fmt:
3535
docker run --rm \
3636
-u "$(shell id -u):$(shell id -g)" \
3737
-e GOCACHE=/tmp/go-cache \
38+
-e GOMODCACHE=/tmp/go-mod-cache \
3839
-e GOLANGCI_LINT_CACHE=/tmp/golangci-lint-cache \
3940
-v "$(PWD):/app" \
4041
-v "$(HOME)/.cache:/tmp/cache" \
@@ -47,6 +48,7 @@ lint:
4748
docker run --rm \
4849
-u "$(shell id -u):$(shell id -g)" \
4950
-e GOCACHE=/tmp/go-cache \
51+
-e GOMODCACHE=/tmp/go-mod-cache \
5052
-e GOLANGCI_LINT_CACHE=/tmp/golangci-lint-cache \
5153
-v "$(PWD):/app" \
5254
-v "$(HOME)/.cache:/tmp/cache" \
@@ -59,6 +61,7 @@ lint-only:
5961
docker run --rm \
6062
-u "$(shell id -u):$(shell id -g)" \
6163
-e GOCACHE=/tmp/go-cache \
64+
-e GOMODCACHE=/tmp/go-mod-cache \
6265
-e GOLANGCI_LINT_CACHE=/tmp/golangci-lint-cache \
6366
-v "$(PWD):/app" \
6467
-v "$(HOME)/.cache:/tmp/cache" \

0 commit comments

Comments
 (0)