I have a Dockerifle like that:
ARG CADDY_VERSION=2.11.3
FROM caddy:${CADDY_VERSION}-builder-alpine AS builder
RUN xcaddy build \
--with github.com/caddy-dns/cloudflare
FROM caddy:${CADDY_VERSION}-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
and the docker-compose.yml file I use:
services:
caddy:
pull_policy: build
build:
context: .
And to build new versions I modify the Dockerfile after doing a docker compose down, and then to build the new version I use docker compose up.


I have a Dockerifle:
ARG CADDY_VERSION=2.11.3 FROM caddy:${CADDY_VERSION}-builder-alpine AS builder RUN xcaddy build \ --with github.com/caddy-dns/cloudflare FROM caddy:${CADDY_VERSION}-alpine COPY --from=builder /usr/bin/caddy /usr/bin/caddyand the docker-compose.yml file I have this snippet at the top, of course this isn’t the full file as there are specifics to my usecase in my full yml:
services: caddy: pull_policy: build build: context: .And to build new versions I modify the Dockerfile after doing a docker compose down, and then to build the new version I use docker compose up.``
Though this is outdated for my current setup, as I also use github.com/lucaslorentz/caddy-docker-proxy by adding “–with github.com/lucaslorentz/caddy-docker-proxy/v2” below where I added the Cloudflare repo.
This is so I can use Docker Labels to to automate entries.