Skip to content

Commit

Permalink
Disable CGO in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed Mar 6, 2024
1 parent 56a76e5 commit cf46f9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ ENV GOTOOLCHAIN=local
WORKDIR /workspace
COPY . .
ARG VERSION
RUN GO_LDFLAGS="main.Version=${VERSION}" make build-all
RUN CGO_ENABLED=0 GO_LDFLAGS="main.Version=${VERSION}" make build-all

FROM gcr.io/distroless/static:nonroot
LABEL source_repository="https://github.com/sapcc/vpa_butler"
WORKDIR /
COPY --from=builder /workspace/build/vpa_butler .
COPY --from=builder /workspace/build/vpa_butler /vpa_butler
USER nonroot:nonroot
ENTRYPOINT ["/vpa_butler"]

0 comments on commit cf46f9d

Please sign in to comment.