Sign inSign up

domizhang/caddy

By domizhang

Updated about 1 month ago

Custom Caddy image with Cloudflare DNS, L4, cache, and IP utility plugins

Image
0

3.7K

domizhang/caddy repository overview

Caddy

Custom Docker image for Caddy with a curated set of plugins for DNS automation, layer 4 proxying, caching, and IP range utilities.

Docker Pulls Docker Image Size

Included version

  • Caddy: 2.11.4
  • Builder image: golang:1.26-alpine3.23
  • Runtime image: alpine:3.23

Included plugins

Security dependency floors

Supported platforms

  • linux/amd64
  • linux/arm64

Tags

  • latest: latest build from the default branch
  • 2.11.4: current Caddy version build
  • 2.11: major/minor tag for versioned releases

Quick start

docker 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

Docker Compose

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:

Build locally

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 .

Update policy

The Caddy version is pinned in VERSION and Dockerfile. To update:

  1. Check the upstream Caddy releases.
  2. Update VERSION / CADDY_VERSION.
  3. Build and test the image.
  4. Tag the repository as 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.

License

This repository only builds a Docker image. Caddy and included plugins are distributed under their respective upstream licenses.

Tag summary

Content type

Image

Digest

sha256:9a2318e79

Size

40.5 MB

Last updated

about 1 month ago

docker pull domizhang/caddy