mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-11 08:55:27 +03:00
Fix - go build to static binaries
This commit is contained in:
parent
fc251d9d42
commit
b20e33c24b
@ -24,7 +24,7 @@ COPY . ./
|
||||
FROM base AS build
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build go build -o /out/scorecard .
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /out/scorecard .
|
||||
|
||||
FROM gcr.io/distroless/base:nonroot
|
||||
COPY --from=build /out/scorecard /
|
||||
|
Loading…
Reference in New Issue
Block a user