Docker container for Caddy
Clone or download
Pull request Compare This branch is 5 commits ahead, 15 commits behind abiosoft:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
builder
example
.dockerignore
BUILDER.md
Caddyfile
Dockerfile
LICENSE
README.md
init.sh

README.md

This project is forked from abiosoft/caddy-docker. And I modified it to make it be more convenient to use.

caddy

A Docker image for Caddy. This image includes no plugin.

Check MephistoMMM/caddy:builder for generating cross-platform Caddy binaries.

License

This image is built from source code. As such, it is subject to the project's Apache 2.0 license, but it neither contains nor is subject to the EULA for Caddy's official binary distributions.

Let's Encrypt Subscriber Agreement

Caddy may prompt to agree to Let's Encrypt Subscriber Agreement. This is configurable with ACME_AGREE environment variable. Set it to true to agree. ACME_AGREE=true.

Getting Started

This image is started by docker-compose, you have to install it first. If you had, run following script:

$ ./init.sh path/to/service_dir

This script will build some necessary docker images, create your service_dir if it doesn't exist, and finally run the caddy server in docker container.

Point your browser to http://127.0.0.1:80.

All of running configurations could be modified in docker-compose.yml, except Paths in container.

Paths in container

Caddyfile: /root/conf/Caddyfile

Sites root: /root/srv

Let's Encrypt Auto SSL

Note that this does not work on local environments.

Use a valid domain and add email to your Caddyfile to avoid prompt at runtime. Replace mydomain.com with your domain and user@host.com with your email.

mydomain.com
tls user@host.com