Custom Caddy image with Cloudflare DNS, L4, cache, and IP utility plugins
4.7K
Custom Docker image for Caddy with a curated set of plugins for DNS automation, layer 4 proxying, caching, and IP range utilities.
2.11.9golang:1.26-alpine3.24alpine:3.24github.com/caddy-dns/cloudflaregithub.com/mholt/caddy-l4github.com/caddyserver/cache-handlergithub.com/fvbommel/caddy-combine-ip-rangesgithub.com/WeidiDeng/caddy-cloudflare-ipgithub.com/go-jose/go-jose/[email protected]github.com/go-jose/go-jose/[email protected]github.com/Azure/[email protected]golang.org/x/[email protected]golang.org/x/[email protected]google.golang.org/[email protected]linux/amd64linux/arm64latest: latest build from the default branch2.11.9: current Caddy version build2.11: major/minor tag for versioned releasesdocker run --rm domizhang/caddy:latest caddy version
Run 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:latest
services:
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.9 \
-t domizhang/caddy:local .
The Caddy version is pinned in VERSION and Dockerfile. To update:
VERSION / CADDY_VERSION.vX.Y.Z to 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.
Runtime package layers are rebuilt against current repository metadata, even when the application version is unchanged. CI rejects the two CA roots revoked in October 2026 by DER SHA256 and fails on an empty or unreadable trust bundle.
Content type
Image
Digest
sha256:6050909ef…
Size
42.5 MB
Last updated
14 days ago
docker pull domizhang/caddy