Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hectorm/docker-caddy

A Docker image for Caddy.
https://github.com/hectorm/docker-caddy

Last synced: 11 days ago
JSON representation

A Docker image for Caddy.

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
```