caddyThis is a docker image for Caddy server running on Alpine container with runit process supervisor.
Volumes
Ports
Available environment variables| Name | Default value |
|---|---|
| CADDY_AGREE | false |
| CADDY_CA | https://acme-v01.api.letsencrypt.org/directory |
| CADDY_CA_TIMEOUT | 10s |
| CADDY_CPU | 100% |
| CADDY_EMAIL | [empty] |
| CADDY_GRACE | 5s |
| CADDY_HTTP2 | true |
| CADDY_QUIET | false |
| CADDY_PORT | 2015 |
| CADDY_HTTP_PORT | 80 |
| CADDY_HTTPS_PORT | 443 |
| PGID | 1050 |
| PUID | 1050 |
How to use this imagedocker build -t dsuite/caddy .
docker run -it -d --name=caddy \
-p 2015:2015 \
-v $(PWD)/path/to/Caddyfile:/etc/caddy/Caddyfile \
-v $(PWD)/path/to/www:/var/www \
dsuite/caddy:1.0
Point your browser to http://localhost:2015.
Save certificates on host machine to prevent regeneration every time container starts. Let's Encrypt has rate limit.
docker run -it -d --name=caddy \
-p 80:80 -p 443:443 \
-v $(PWD)/path/to/certs:/etc/caddy/certificates \
-v $(PWD)/path/to/Caddyfile:/etc/caddy/Caddyfile \
-v $(PWD)/path/to/www:/var/www \
dsuite/caddy:1.0
Here, /etc/caddy/certificates is the location inside the container where caddy will save certificates.
To start or stop caddy, get an sh command prompt inside the container:
docker exec -it caddy sh
# Start caddy
runit service caddy start
# Stop caddy
runit service caddy stop
# Restart caddy
runit service caddy restart
# Status of caddy
runit service caddy status
# Stop the container
runit stop
How to add pluginsdsuite/caddy comes with an installer which download and intall the latest version from caddyserver.com
Update the PLUGINS environment variable with a coma separated list of plugin and run caddy-install.sh to download and install the latest version of caddy with the desired plugins.
FROM dsuite/caddy:latest
ENV PLUGINS="http.git"
An exampleHave a look at the example folder. You'll find out how to create an image based on dsuite/caddy
Content type
Image
Digest
Size
18.8 MB
Last updated
almost 5 years ago
docker pull dsuite/caddy