diff --git a/dockers/agent/core/ngt/Dockerfile b/dockers/agent/core/ngt/Dockerfile index 9df3fe2dbf..a13e92d0bd 100644 --- a/dockers/agent/core/ngt/Dockerfile +++ b/dockers/agent/core/ngt/Dockerfile @@ -69,7 +69,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -93,7 +93,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN make ngt/install RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/agent/sidecar/Dockerfile b/dockers/agent/sidecar/Dockerfile index aa7c3e31a5..c602fbd43b 100644 --- a/dockers/agent/sidecar/Dockerfile +++ b/dockers/agent/sidecar/Dockerfile @@ -62,7 +62,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -85,7 +85,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/ci/base/Dockerfile b/dockers/ci/base/Dockerfile index 9b5009ac12..edf2db83d7 100644 --- a/dockers/ci/base/Dockerfile +++ b/dockers/ci/base/Dockerfile @@ -75,11 +75,11 @@ COPY versions versions COPY hack/go.mod.default hack/go.mod.default RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make deps ROOTDIR=$ROOTDIR GO_CLEAN_DEPS=false RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make ngt/install \ && make helm/install \ && make helm-docs/install \ diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index d478f9e071..00ae3fa9da 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -56,7 +56,7 @@ COPY hack/go.mod.default hack/go.mod.default # basic deps RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make deps GO_CLEAN_DEPS=false \ && make ngt/install \ && make helm/install \ @@ -69,7 +69,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ # additional deps RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make k3d/install \ && make buf/install \ && make k9s/install \ diff --git a/dockers/discoverer/k8s/Dockerfile b/dockers/discoverer/k8s/Dockerfile index 1597e23bb7..d6819fe551 100644 --- a/dockers/discoverer/k8s/Dockerfile +++ b/dockers/discoverer/k8s/Dockerfile @@ -62,7 +62,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -82,7 +82,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/gateway/filter/Dockerfile b/dockers/gateway/filter/Dockerfile index 4e7936e8d4..23dcafa1dd 100644 --- a/dockers/gateway/filter/Dockerfile +++ b/dockers/gateway/filter/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -81,7 +81,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/gateway/lb/Dockerfile b/dockers/gateway/lb/Dockerfile index d0cdd302c3..d54cd7b49d 100644 --- a/dockers/gateway/lb/Dockerfile +++ b/dockers/gateway/lb/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -81,7 +81,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/gateway/mirror/Dockerfile b/dockers/gateway/mirror/Dockerfile index 24cb166fae..d146917731 100644 --- a/dockers/gateway/mirror/Dockerfile +++ b/dockers/gateway/mirror/Dockerfile @@ -57,7 +57,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ go mod download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -83,7 +83,7 @@ COPY Makefile . COPY .git . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/index/job/correction/Dockerfile b/dockers/index/job/correction/Dockerfile index bdcaafc9f9..bb7c3e3d3c 100644 --- a/dockers/index/job/correction/Dockerfile +++ b/dockers/index/job/correction/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -81,7 +81,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/index/job/creation/Dockerfile b/dockers/index/job/creation/Dockerfile index e5291663b8..a0bd366138 100644 --- a/dockers/index/job/creation/Dockerfile +++ b/dockers/index/job/creation/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -81,7 +81,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/index/job/readreplica/rotate/Dockerfile b/dockers/index/job/readreplica/rotate/Dockerfile index 570d331a7d..36e19db46f 100644 --- a/dockers/index/job/readreplica/rotate/Dockerfile +++ b/dockers/index/job/readreplica/rotate/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -81,7 +81,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/index/job/save/Dockerfile b/dockers/index/job/save/Dockerfile index daabde1687..6b5a6beb39 100644 --- a/dockers/index/job/save/Dockerfile +++ b/dockers/index/job/save/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -81,7 +81,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/manager/index/Dockerfile b/dockers/manager/index/Dockerfile index b78d797ac8..72a77f0cd7 100644 --- a/dockers/manager/index/Dockerfile +++ b/dockers/manager/index/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -81,7 +81,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/tools/benchmark/job/Dockerfile b/dockers/tools/benchmark/job/Dockerfile index b363671dd4..3d678ee7ba 100644 --- a/dockers/tools/benchmark/job/Dockerfile +++ b/dockers/tools/benchmark/job/Dockerfile @@ -91,7 +91,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -111,7 +111,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/tools/benchmark/operator/Dockerfile b/dockers/tools/benchmark/operator/Dockerfile index a4b846c909..22e298b3f2 100644 --- a/dockers/tools/benchmark/operator/Dockerfile +++ b/dockers/tools/benchmark/operator/Dockerfile @@ -66,7 +66,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal @@ -86,7 +86,7 @@ COPY versions . WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" diff --git a/dockers/tools/cli/loadtest/Dockerfile b/dockers/tools/cli/loadtest/Dockerfile index bf25bc409a..22c181fc9c 100644 --- a/dockers/tools/cli/loadtest/Dockerfile +++ b/dockers/tools/cli/loadtest/Dockerfile @@ -61,7 +61,7 @@ COPY go.mod . COPY go.sum . RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ - --mount=type=cache,target="/tmp/.cache/go-build",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ make go/download WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal