Skip to content

Commit 4055f39

Browse files
authored
Use scratch base image but certs from alpine (#443)
1 parent 028bfc1 commit 4055f39

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ RUN go mod download
88
COPY . .
99
RUN CGO_ENABLED=0 go build -buildvcs=false ./cmd/mc-router
1010

11-
FROM gcr.io/distroless/static-debian12
11+
FROM alpine AS certs
12+
RUN apk add -U \
13+
ca-certificates
14+
15+
FROM scratch
1216
ENTRYPOINT ["/mc-router"]
17+
COPY --from=certs /etc/ssl/certs/ /etc/ssl/certs
1318
COPY --from=builder /build/mc-router /mc-router

Dockerfile.release

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
FROM gcr.io/distroless/static-debian12
1+
FROM alpine AS certs
2+
RUN apk add -U \
3+
ca-certificates
4+
5+
FROM scratch
26

37
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
48
LABEL org.opencontainers.image.title="mc-router"
59
LABEL org.opencontainers.image.source="https://github.com/itzg/mc-router"
610

11+
COPY --from=certs /etc/ssl/certs/ /etc/ssl/certs
712
COPY mc-router /
813
ENTRYPOINT ["/mc-router"]

0 commit comments

Comments
 (0)