Custom Docker image for Caddy with a curated set of plugins for DNS automation, layer 4 proxying, caching, and IP range utilities.
- Caddy:
2.11.4 - Builder image:
golang:1.26-alpine3.23 - Runtime image:
alpine:3.23
github.com/caddy-dns/cloudflaregithub.com/mholt/caddy-l4github.com/caddyserver/cache-handlergithub.com/fvbommel/caddy-combine-ip-rangesgithub.com/WeidiDeng/caddy-cloudflare-ip
github.com/go-jose/go-jose/v3@v3.0.5github.com/go-jose/go-jose/v4@v4.1.4github.com/Azure/go-ntlmssp@v0.1.1
linux/amd64linux/arm64
latest: latest build from the default branch2.11.4: current Caddy version build2.11: major/minor tag for versioned releases
docker run --rm domizhang/caddy:latest caddy versionRun with a local Caddyfile:
docker run -d \
--name caddy \
-p 80:80 \
-p 443:443 \
-p 443:443/udp \
-v "$PWD/Caddyfile:/etc/caddy/Caddyfile:ro" \
-v caddy_data:/data \
-v caddy_config:/config \
domizhang/caddy:latestservices:
caddy:
image: domizhang/caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config:BuildKit cache mounts are used for Go module and build caches, so repeated local and CI builds can reuse downloaded modules and compiled packages.
docker build \
--build-arg CADDY_VERSION=2.11.4 \
-t domizhang/caddy:local .The Caddy version is pinned in VERSION and Dockerfile. To update:
- Check the upstream Caddy releases.
- Update
VERSION/CADDY_VERSION. - Build and test the image.
- Tag the repository as
vX.Y.Zto publish versioned tags.
Plugin versions intentionally follow their module defaults during the Caddy build. Pin plugin module versions in the Dockerfile if you need stricter reproducibility.
This repository only builds a Docker image. Caddy and included plugins are distributed under their respective upstream licenses.