FROM caddy:2.9-builder AS builder

RUN xcaddy build \
    --with github.com/caddy-dns/route53 \
    --with github.com/mholt/caddy-dynamicdns \
    --with github.com/zhangjiayin/caddy-geoip2 \
    --with github.com/mholt/caddy-l4 \
    --with github.com/greenpau/caddy-security

FROM caddy:2.9-alpine

COPY --from=builder /usr/bin/caddy /usr/bin/caddy
