diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2024-04-10 02:09:47 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2024-04-10 02:09:47 +0300 |
commit | 144c5724ea7ed4f1a9002e065f517e1403ef4e76 (patch) | |
tree | 1334815f17a0364aad3c3fc73dedb577200226a3 /staging.Dockerfile | |
parent | 3e772be7a6f3312958c0ea0de7eff7a45ece192b (diff) |
Fix module cache in staging.Dockerfile
Diffstat (limited to 'staging.Dockerfile')
-rw-r--r-- | staging.Dockerfile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/staging.Dockerfile b/staging.Dockerfile index 7b9a91b..e9fdd1e 100644 --- a/staging.Dockerfile +++ b/staging.Dockerfile @@ -23,15 +23,18 @@ FROM base AS cache ARG VERSION COPY --from=tdlib /compiled/ /usr/local/ WORKDIR /src -RUN --mount=type=cache,target=/go \ - --mount=type=cache,target=/root/.cache/go-build \ +RUN go env -w GOCACHE=/go-cache +RUN go env -w GOMODCACHE=/gomod-cache +RUN --mount=type=cache,target=/gomod-cache \ --mount=type=bind,source=./,target=/src \ - go get + go mod download FROM cache AS build ARG MAKEOPTS WORKDIR /src RUN --mount=type=bind,source=./,target=/src,rw \ + --mount=type=cache,target=/go-cache \ + --mount=type=cache,target=/gomod-cache \ --mount=type=cache,destination=/src/release \ make ${MAKEOPTS} |