Skip to content

Commit

Permalink
use scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
rucciva committed Sep 17, 2024
1 parent cddab4d commit 61d64e1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1.2

ARG BUILDER_VERSION=2.7.5
ARG CADDY_VERSION=2.7.5
ARG BUILDER_VERSION=2.8.4
ARG CADDY_VERSION=2.8.4


FROM caddy:${BUILDER_VERSION}-builder-alpine AS builder
Expand All @@ -11,10 +11,19 @@ RUN --mount=type=cache,target=/go/pkg/mod \
xcaddy build v${CADDY_VERSION} \
--with github.com/caddy-dns/cloudflare \
--with github.com/mholt/caddy-ratelimit \
--with github.com/greenpau/caddy-security
--with github.com/greenpau/caddy-security \
--with github.com/mholt/caddy-l4


FROM caddy:alpine

FROM caddy:alpine AS final-debug

RUN apk add --no-cache ca-certificates
COPY --from=builder /usr/bin/caddy /usr/bin/caddy



FROM scratch AS final

COPY --from=final-debug /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

0 comments on commit 61d64e1

Please sign in to comment.