Skip to content

hotio/caddy

GitHub
GitHub Registry
Docker Hub
Caddy

00

What is this?

A docker image with Caddy 2 and fail2ban integrated.

Starting the container

docker run --rm \
    --name caddy \
    -p 80:8080 \
    -p 443:8443 \
    -e PUID=1000 \
    -e PGID=1000 \
    -e UMASK=002 \
    -e TZ="Etc/UTC" \
    -e CUSTOM_BUILD="" \
    -v /<host_folder_config>:/config \
    --cap-add=NET_ADMIN \
    hotio/caddy
version: "3.7"

services:
  caddy:
    container_name: caddy
    image: hotio/caddy
    ports:
      - "80:8080"
      - "443:8443"
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=002
      - TZ=Etc/UTC
      - CUSTOM_BUILD
    volumes:
      - /<host_folder_config>:/config
    cap_add:
      - NET_ADMIN

Custom build

If you set the environment variable CUSTOM_BUILD to a file location like for example /config/caddy_linux_amd64_custom, an attempt is made to start Caddy with that binary. The custom build can be obtained from the Caddy download page. This is particularly useful if you need extra modules.

Tags

Tag Upstream Version Commit Last Updated