Sign inSign up

dtcokr/caddy

By dtcokr

•Updated over 6 years ago
Archived

Caddy built with plugins from source in docker.

Image
0

447

dtcokr/caddy repository overview

⁠docker-caddy

Docker Pulls GitHub last commit

Run caddy in docker, build from source⁠, add plugin from source. Agree to Let's Encrypt Subscriber Agreement⁠ by DEFAULT. Otherwise, modify the Dockerfile.

⁠Plugins

This image includes ipfilter⁠, git⁠, nobots⁠, realip⁠ and caddy-docker-proxy⁠ plugins. Plugins can be configured via the plugin.go⁠ file in the repository.

⁠Usage

$ docker run -d -p 2015:2015 dtcokr/caddy

Go to http://127.0.0.1:2015 to check if Caddy is running. If running remotely, go to http://remote_ip:2015.

⁠Saving Certificates

Default certificates location /root/.caddy

$ docker run -d \
    -v $PWD/Caddyfile:/etc/Caddyfile \
    -v $HOME/.caddy:/root/.caddy \
    -p 80:80 \
    -p 443:443 \
    dtcokr/caddy
⁠Mount sites root

Caddyfile: /etc/Caddyfile

Sites root: /www

$ docker run -d \
    -v /path/to/Caddyfile:/etc/Caddyfile \
    -v /path/to/sites/root:/www
    -p 80:80 \
    dtcokr/caddy
⁠With Let's Encrypt SSL

Add a vaild domain and email to your Caddyfile.

yourdomain.com
tls [email protected]

Run:

$ docker run -d \
    -v /path/to/Caddyfile:/etc/Caddyfile \
    -v $HOME/.caddy:/root/.caddy \
    -v /path/to/sites/root:/www \
    -p 80:80 \
    -p 443:443 \
    dtcokr/caddy
⁠Caddy-docker-proxy usage

See Caddy-docker-proxy(GitHub)⁠

docker-compose.yml example: use labels to generate Caddyfile

version: "3"
services:
  caddy:
    images: dtcokr/caddy
    ports:
      - "80:80"
      - "443:443"
      - "2015:2015"
    networks:
      - caddy
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "/www:/www"
    restart: always
    labels:
      caddy: ":2015"
      caddy.root: "/www"
networks:
  caddy:

Tag summary

Content type

Image

Digest

Size

14.6 MB

Last updated

over 6 years ago

docker pull dtcokr/caddy