移至檔案
jreichmann 85bca47cba
the build failed 詳情
Documentation outdated (#2)
2018-12-05 22:22:50 +00:00
root/etc chore: add s6 svscan finish file 2018-08-09 08:19:47 +02:00
.drone.yml chore: add newer versions to build 2018-08-09 08:18:03 +02:00
Dockerfile fix: add ca-certificates, so that requesting certificates doesn't fail 2018-08-09 08:18:03 +02:00
README.md Documentation outdated (#2) 2018-12-05 22:22:50 +00:00
plugins.txt update caddy 2017-09-04 18:41:05 +02:00

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