mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 06:15:51 +00:00
chore: use scratch image for Dockerfile instead of distroless (#226)
* Use Google Distroless for compact images, and some refactoring of Dockerfile * Use "scratch" image instead of Distroless, and some additional optimizations in Dockerfile
This commit is contained in:
parent
79d255719e
commit
46acc0834c
@ -1,7 +1,8 @@
|
|||||||
FROM golang:alpine as builder
|
FROM golang:alpine AS builder
|
||||||
WORKDIR /go
|
WORKDIR /go
|
||||||
RUN go install github.com/xvzc/SpoofDPI/cmd/spoofdpi@latest
|
RUN go install -ldflags '-w -s -extldflags "-static"' -tags timetzdata github.com/xvzc/SpoofDPI/cmd/spoofdpi@latest
|
||||||
|
|
||||||
FROM gcr.io/distroless/static-debian12
|
FROM scratch
|
||||||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
COPY --from=builder /go/bin/spoofdpi /
|
COPY --from=builder /go/bin/spoofdpi /
|
||||||
ENTRYPOINT ["/spoofdpi"]
|
ENTRYPOINT ["/spoofdpi"]
|
||||||
|
Loading…
Reference in New Issue
Block a user