FROM caddy:2.10-builder AS builder

RUN xcaddy build \
    --with github.com/caddy-dns/route53 \
    --with github.com/mholt/caddy-dynamicdns@b846b9e \
    --with github.com/zhangjiayin/caddy-geoip2@0de3173 \
    --with github.com/mholt/caddy-l4@4a517a9 \
    --with github.com/greenpau/caddy-security@v1.1.31

FROM caddy:2.10-alpine

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