This is a dockerfile for Caddy Server. Everything is loaded into /var/www/html
directory. The Caddyfile is put into /etc/caddy/Caddyfile
By default, content present inside /var/www/html
will be served over web on the port 2015. Ports 80, 443, 8080 and 8443 are also exposed. Mount your content here with appropriate permissions.
List of installed plugins is available in 'plugin_list' file in same directory. For reference :
github.com/casbin/caddy-authz
github.com/jung-kurt/caddy-cgi
github.com/captncraig/cors
github.com/abiosoft/caddy-git
github.com/payintech/caddy-datadog
github.com/nicolasazrak/caddy-cache
github.com/simia-tech/caddy-locale
github.com/echocat/caddy-filter
github.com/xuqingfeng/caddy-rate-limit
blitznote.com/src/caddy.upload
github.com/miquella/caddy-awses
github.com/miekg/caddy-prometheus
A default caddyserver config file is loaded into container. To overwrite default caddy file in a built container, you can mount your own at /etc/caddy/Caddyfile
,
however you are responsible for setting appropriate permissions.
Some of the plugins are installed, but not configured by default as they may have application specific settings.
You can read more about how to create your own Caddyfile at the caddyfile Syntax documentation.
$ docker run -d -v $(pwd)/Caddyfile:/etc/caddy/Caddyfile -v $(pwd)/mysite:/var/www/html --name=mycaddy registry.centos.org/caddyserver/caddyserver:latest
Note : For docker volume mounts using -v, you might encounter issues with selinux permission denies. Please take nesessary steps to avoid any issues