dockerfile: keep context mount as read only (#4167)

This commit is contained in:
Milos Gajdos
2023-11-22 11:01:39 +00:00
committed by GitHub

View File

@@ -23,7 +23,7 @@ FROM base AS build
ARG TARGETPLATFORM
ARG LDFLAGS="-s -w"
ARG BUILDTAGS="include_gcs"
RUN --mount=type=bind,target=/src,rw \
RUN --mount=type=bind,target=/src \
--mount=type=cache,target=/root/.cache/go-build \
--mount=target=/go/pkg/mod,type=cache \
--mount=type=bind,source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \