Use scratch base image but certs from alpine (#443)
This commit is contained in:
+6
-1
@@ -8,6 +8,11 @@ RUN go mod download
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN CGO_ENABLED=0 go build -buildvcs=false ./cmd/mc-router
|
RUN CGO_ENABLED=0 go build -buildvcs=false ./cmd/mc-router
|
||||||
|
|
||||||
FROM gcr.io/distroless/static-debian12
|
FROM alpine AS certs
|
||||||
|
RUN apk add -U \
|
||||||
|
ca-certificates
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
ENTRYPOINT ["/mc-router"]
|
ENTRYPOINT ["/mc-router"]
|
||||||
|
COPY --from=certs /etc/ssl/certs/ /etc/ssl/certs
|
||||||
COPY --from=builder /build/mc-router /mc-router
|
COPY --from=builder /build/mc-router /mc-router
|
||||||
|
|||||||
+6
-1
@@ -1,8 +1,13 @@
|
|||||||
FROM gcr.io/distroless/static-debian12
|
FROM alpine AS certs
|
||||||
|
RUN apk add -U \
|
||||||
|
ca-certificates
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
LABEL org.opencontainers.image.title="mc-router"
|
LABEL org.opencontainers.image.title="mc-router"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/itzg/mc-router"
|
LABEL org.opencontainers.image.source="https://github.com/itzg/mc-router"
|
||||||
|
|
||||||
|
COPY --from=certs /etc/ssl/certs/ /etc/ssl/certs
|
||||||
COPY mc-router /
|
COPY mc-router /
|
||||||
ENTRYPOINT ["/mc-router"]
|
ENTRYPOINT ["/mc-router"]
|
||||||
|
|||||||
Reference in New Issue
Block a user