dockerfile: keep context mount as read only

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-11-22 09:49:44 +01:00
parent 06505be5d5
commit d0b78f5e1c
No known key found for this signature in database
GPG key ID: ADE44D8C9D44FBE4

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 \