https://github.com/hectorm/docker-caddy
A Docker image for Caddy.
https://github.com/hectorm/docker-caddy
Last synced: about 1 year ago
JSON representation
A Docker image for Caddy.
- Host: GitHub
- URL: https://github.com/hectorm/docker-caddy
- Owner: hectorm
- License: mit
- Created: 2019-10-02T21:49:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-13T02:10:07.000Z (over 1 year ago)
- Last Synced: 2025-04-28T15:18:43.234Z (about 1 year ago)
- Language: Makefile
- Homepage: https://hub.docker.com/r/hectorm/caddy
- Size: 528 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Caddy on Docker
A Docker image for [Caddy](https://caddyserver.com).
## Examples
### Serve the current directory
```sh
docker run --rm -it \
--publish 80:80/tcp \
--publish 443:443/tcp \
--publish 443:443/udp \
--mount type=bind,src="$PWD",dst=/var/www/html/,ro \
docker.io/hectorm/caddy:latest
```
### Serve `/var/www/html/` directory and use `/etc/caddy/Caddyfile` file as config
```sh
docker run --rm -it \
--publish 80:80/tcp \
--publish 443:443/tcp \
--publish 443:443/udp \
--mount type=bind,src=/etc/caddy/Caddyfile,dst=/etc/caddy/Caddyfile,ro \
--mount type=bind,src=/var/www/html/,dst=/var/www/html/,ro \
docker.io/hectorm/caddy:latest
```