build(docker): cache pinned Go compilation stages
Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
1 parent
e2cfccedf1
commit
f5a3c67a68
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ ENV CGO_ENABLED=0 GOTOOLCHAIN=local
|
|||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY cmd/ ./cmd/
|
COPY cmd/ ./cmd/
|
||||||
RUN go build -trimpath -o /out/zapret-autotune ./cmd/zapret-autotune
|
RUN --mount=type=cache,target=/root/.cache/go-build go build -trimpath -o /out/zapret-autotune ./cmd/zapret-autotune
|
||||||
|
|
||||||
FROM vernette/ss-zapret2@sha256:ba158180f27cd71a291ee521c291490374fd3fcf2f81eb1434ddfb19d35de45b
|
FROM vernette/ss-zapret2@sha256:ba158180f27cd71a291ee521c291490374fd3fcf2f81eb1434ddfb19d35de45b
|
||||||
COPY --from=build /out/zapret-autotune /usr/local/bin/zapret-autotune
|
COPY --from=build /out/zapret-autotune /usr/local/bin/zapret-autotune
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ ENV CGO_ENABLED=0 GOTOOLCHAIN=local
|
|||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY cmd/ ./cmd/
|
COPY cmd/ ./cmd/
|
||||||
RUN go build -trimpath -o /out/zapret-autotune ./cmd/zapret-autotune
|
RUN --mount=type=cache,target=/root/.cache/go-build go build -trimpath -o /out/zapret-autotune ./cmd/zapret-autotune
|
||||||
|
|
||||||
FROM vernette/ss-zapret2@sha256:ba158180f27cd71a291ee521c291490374fd3fcf2f81eb1434ddfb19d35de45b
|
FROM vernette/ss-zapret2@sha256:ba158180f27cd71a291ee521c291490374fd3fcf2f81eb1434ddfb19d35de45b
|
||||||
USER root
|
USER root
|
||||||
|
|||||||
Reference in new issue
Block a user