ARG CADDY_VERSION={{ item.version }} FROM caddy:{{ item.version }}-builder AS builder RUN xcaddy build \ --with github.com/lucaslorentz/caddy-docker-proxy/v2 \ --with github.com/hairyhenderson/caddy-teapot-module \ --with github.com/caddy-dns/cloudflare FROM caddy:{{ item.version }}-{{ item.os }} COPY --from=builder /usr/bin/caddy /usr/bin/caddy # Only for standalone Caddy. This one's pimped. #CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] CMD ["caddy", "docker-proxy"]