No Description
jreichmann 85bca47cba Documentation outdated (#2) 4 months ago
root/etc chore: add s6 svscan finish file 8 months ago
.drone.yml chore: add newer versions to build 8 months ago
Dockerfile fix: add ca-certificates, so that requesting certificates doesn't fail 8 months ago
README.md Documentation outdated (#2) 4 months ago
plugins.txt update caddy 1 year ago

README.md

docker.jcg.re/caddy

Build Status

Tags:

  • latest: latest stable version (currently 0.10.10)
  • v0.10.10: v0.10.10 of caddy
  • v0.10.9: v0.10.9 of caddy
  • v0.10.8: v0.10.8 of caddy
  • v0.10.7: v0.10.7 of caddy
  • v0.10.6: v0.10.6 of caddy
  • v0.10.5: v0.10.5 of caddy
  • v0.10.4: v0.10.4 of caddy

Build-time variables

Environment variables

  • UID: user id (default: 192)
  • GID: group id (default: 192)
  • DOMAIN: the domain that should be served (required for automatic tls)
  • EMAIL: the email address to use for let’s encrypt (required for automatic tls)
  • USE_QUIC: set this to anything to enable experimental quic support (default: off)
  • LE_STAGING: use staging let’s encrypt endpoint (default: off -> production)

Volumes

  • /etc/caddy/Caddyfile: webserver configuration (optional)
  • /var/www/: content to serve
  • /caddy: caddy will store it’s certificates here (recommended if tls is active)

Ports

  • 80
  • 443

Basic docker-compose.yml example

Insecure example serving the contents of ./websiteon port 80:

version: '2'

services:
    caddy:
        image: docker.jcg.re/caddy
        container_name: caddy
        ports:
            - 80:80
        volumes:
            - ./website:/var/www/

Secure example serving the contents of ./websiteon https://example.com/ with an automatic redirect to https:

version: '2'

services:
    caddy:
        image: docker.jcg.re/caddy
        container_name: caddy
        ports:
            - 80:80
            - 443:443
        volumes:
            - ./website:/var/www/
        environment:
            - DOMAIN=example.com
            - EMAIL=you@example.com

Custom example doing whatever-the-fuck-you-want (take a look at https://caddyserver.com/docs):

version: '2'

services:
    caddy:
        image: docker.jcg.re/caddy
        container_name: caddy
        ports:
            - 80:80
            - 443:443
        volumes:
            - ./website:/var/www
            - ./Caddyfile:/etc/Caddyfile