Skip to content

Commit

Permalink
fix: sonarqube warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Feb 5, 2024
1 parent 55d38f1 commit 77736bb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ FROM golang:1.21 as builder
WORKDIR /go/src/app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY abi bindings cmd dashboard gethkeystore hdwallet metrics p2p proto rpctypes util ./
RUN CGO_ENABLED=0 make build

FROM scratch
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /go/src/app/out/polycli /usr/bin/polycli
USER 65532:65532
ENTRYPOINT ["polycli"]
CMD ["--help"]
CMD ["--help"]

0 comments on commit 77736bb

Please sign in to comment.