diff --git a/common.mk b/common.mk index 48d4e02fd..69862ab02 100644 --- a/common.mk +++ b/common.mk @@ -2,8 +2,8 @@ GO_ARGS ?= GO_PLUGIN_MAKE_TARGET ?= build GO_REPO_ROOT := /go/src/github.com/dokku/dokku BUILD_IMAGE := hub.diyla.com/golang:1.27.3 -GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache -GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod +GO_BUILD_CACHE ?= /var/tmp/dokku-go-build-cache +GO_MOD_CACHE ?= /var/tmp/dokku-go-mod-mod GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT) ifndef TARGETARCH TARGETARCH := $(shell dpkg --print-architecture 2>/dev/null || uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/') @@ -15,7 +15,7 @@ GOARCH ?= $(TARGETARCH) build: $(BUILD) build-in-docker: clean - mkdir -p /tmp/dokku-go-build-cache + mkdir -p $(GO_BUILD_CACHE) $(GO_MOD_CACHE) docker run --rm \ -v $(GO_ROOT_MOUNT) \ -v $(GO_BUILD_CACHE):/root/.cache \