/docker-caddy-php

Caddy plus PHP-FPM

Primary LanguageDockerfile

caddy

License

This image is built from source code. As such, it is subject to the project's Apache 2.0 license, but it neither contains nor is subject to the EULA for Caddy's official binary distributions.

Usage

Default Caddyfile

The image contains a default Caddyfile.

Let's Encrypt Auto SSL

Note that this does not work on local environments.

Use a valid domain and add email to your Caddyfile to avoid prompt at runtime. Replace mydomain.com with your domain and user@host.com with your email.

mydomain.com
tls user@host.com

Run the image

You can change the the ports if ports 9080 and 90443 are not available on host. e.g. 9081:9080, 9444:9443

$ docker run -d \
    -v $(pwd)/Caddyfile:/etc/Caddyfile \
    -p 9080:9080 -p 9443:9443 \
    abiosoft/caddy

https://github.com/docker-library/php/blob/35aedb29009b46af6ea1009c9405d01d3f66968e/7.2/alpine3.7/fpm/Dockerfile