Sign inSign up

benzbrake/caddy

By benzbrake

Updated over 4 years ago

A Multiple Arch Docker image for Caddy

Image
0

3.1K

benzbrake/caddy repository overview

Docker-Caddy

A Docker image for Caddy. This image includes no plugins at default.

Plugins can be configured via the CADDY_PLUGIN build arg.

License

Anti-996 License

Usage

1.Run without any settings.

$ docker run -d -p 80:80 benzbrake/caddy

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

2.Run with custom config files

Store config in directory /data/vhosts and mount to container's folder /www/config, caddy will auto load your config files.

$ docker run -d -v /data/caddy:/data/caddy -v /data/vhosts:/www/config -p 80:80 -p 443:443 benzbrake/caddy

3.Saving Certificates

Save certificates on host machine to prevent regeneration every time container starts.

$ docker run -d -v /data/caddy:/root./caddy -p 80:80 -p 443:443 benzbrake/caddy

4.Custom plugins

docker build --build-arg \
	CADDY_PLUGIN="github.com/caddy-dns/cloudflare github.com/caddy-dns/dnspod" \
    github.com/benzbrake/Docker-Caddy.git

5.php

:php variant of this image bundles PHP-FPM alongside essential php extensions. Default php running user is set to 1000:1000

add thirdparty php extensions

Add thirdparty php extensions to php in container. Put your extensions to /data/php-extensions and run container like:

$ docker run -d -v /data/php-extensions:/www/php-extensions -v /data/web:/www/wwwroot -v /data/vhosts:/www/config -p 80:80 -p 443:443 benzbrake/caddy:php

Feedback

If you have any problems with or questions about this image, please contact me through a GitHub issue.

Tag summary

Content type

Image

Digest

Size

16.2 MB

Last updated

over 4 years ago

docker pull benzbrake/caddy