Skip to content

Commit d7efd69

Browse files
authored
Merge pull request #21943 from kubernetes/copilot/fix-golang-1-25-build
CI: Fix Go 1.25 build failure in kube-cross Docker by setting GOPATH and GOMODCACHE
2 parents 7fcc6ec + f8e5c88 commit d7efd69

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# Folders
77
.cache
8+
.modcache
89
_obj
910
_test
1011

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ endef
184184

185185
# $(call DOCKER, image, command)
186186
define DOCKER
187-
docker run --rm -e GOCACHE=/app/.cache -e IN_DOCKER=1 --user $(shell id -u):$(shell id -g) -w /app -v $(PWD):/app:Z -v $(GOPATH):/go:Z --init $(1) /bin/bash -c '$(2)'
187+
docker run --rm -e GOCACHE=/app/.cache -e GOPATH=/go -e GOMODCACHE=/app/.modcache -e IN_DOCKER=1 --user $(shell id -u):$(shell id -g) -w /app -v $(PWD):/app:Z -v $(GOPATH):/go:Z --init $(1) /bin/bash -c '$(2)'
188188
endef
189189

190190
ifeq ($(BUILD_IN_DOCKER),y)

0 commit comments

Comments
 (0)