ARG VERSION=2.6 ARG VARIANT=alpine FROM docker.io/caddy:${VERSION}-builder-${VARIANT} AS builder RUN xcaddy build \ --with github.com/gamalan/caddy-tlsredis FROM docker.io/caddy:${VERSION}-${VARIANT} COPY --from=builder /usr/bin/caddy /usr/bin/caddy COPY Caddyfile /etc/caddy/ COPY public /srv EXPOSE 9091/tcp ENV SITE_ROOT=/srv RUN ["/usr/bin/caddy", "validate", "--config", "/etc/caddy/Caddyfile"]