Skip to content

Commit

Permalink
Disable buildvcs flag during build
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmelin committed Oct 25, 2022
1 parent 3d2c073 commit 04f5266
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ FROM base AS build
ARG TARGETOS
ARG TARGETARCH
# Build the binary, mounting the Go compiler cache
RUN --mount=type=cache,target=.,target=/go/pkg/mod,target=/root/.cache/go-build \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /out/example .
RUN --mount=target=. \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOFLAGS=-buildvcs=false go build -o /out/example .


FROM base AS unit-test
Expand Down

0 comments on commit 04f5266

Please sign in to comment.