Merge pull request #22388 from Juneezee/go-mod-mounts

docs: use bind mounts in Go Dockerfile examples
This commit is contained in:
Eng Zer Jun
2026-01-22 15:28:53 +08:00
committed by GitHub
parent 814047fe25
commit 9103dff58a
4 changed files with 10 additions and 13 deletions

View File

@@ -8,9 +8,6 @@ FROM golang:${GO_VERSION}-alpine AS base
RUN apk add --no-cache openssl
ENV CGO_ENABLED=0
WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
FROM base AS releaser
RUN --mount=type=bind,target=. \