Skip to content

Commit

Permalink
chore: docker使用scratch基础镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Sep 18, 2024
1 parent 1e5dcf0 commit 2eed3d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ COPY . .
RUN go mod download
RUN make build

FROM alpine:latest
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /app/build/yunzhijia-status-checker /main
ENTRYPOINT ["/main"]
CMD ["--config", "/config/config.json"]

0 comments on commit 2eed3d6

Please sign in to comment.