Custom Caddy image with Cloudflare DNS, L4, cache, and IP utility plugins
3.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.4golang:1.26-alpine3.23alpine:3.23github.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]google.golang.org/[email protected]linux/amd64linux/arm64latest: latest build from the default branch2.11.4: 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.4 \
-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.
Content type
Image
Digest
sha256:9a2318e79…
Size
40.5 MB
Last updated
about 1 month ago
docker pull domizhang/caddy