You could just build it yourself, there's not much to it.
Dockerfile:
ARG VERSION=2
FROM caddy:${VERSION}-builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/cloudflare
FROM caddy:${VERSION}
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
My Dockerfile is under dockerfile-dns and then in docker-compose.yaml instead of pointing to an image I have:
services:
caddy:
build: ./dockerfile-dns
I'm not 100% sure of the right way to update it, but I think I usually use something like docker compose build --pull --no-cache.