Caddy image to serve http or https with php. Forked from abiosoft/caddy-docker to arm
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Caddy+PHP for ARM

A Docker image for Caddy that will let you to serve http or https with php support, with Let's Encrypt certificate autogenerated. This image includes the git plugin. Plugins can be configured via the plugins build arg. Forked from abiosoft/caddy-docker replacing the official Alpine Linux base image with hypriot/rpi-alpine-scratch from the amazing people of Hypriot Pirate Crew in order to build a suitable image for arm devices such as rpi, odroid. I replaced this image in latest version with almost docker official image arm32v6/alpine from Docker Official Images

Be aware! You should read carefully the usage documentation of the original repository! abiosoft/caddy-docker



Getting Started

This is a simple usage for testing proposes.

$ docker run -d -p 2015:2015 elswork/arm-caddyphp:latest

Point your browser to

My Real Usage Example

In order everyone could take full advantages of the usage of this docker container, I'll describe my own real usage setup.

$ docker run -d \
    --name myarm-caddyphp \
    -p 80:80 -p 443:443 \
    -v /var/www/html:/srv \
    -v $HOME/Caddyfile/phphttps:/etc/Caddyfile \
    -v $HOME/.caddy:/root/.caddy \

Description of parameters

--name myarm-caddyphp This is absolutely optional, it helps to me to easily identify and operate the container after the first execution.

$ docker start myarmphp-caddy
$ docker stop myarmphp-caddy
$ docker rm myarmphp-caddy

-p 80:80 -p 443:443 Caddy will serve https by default.

-v /var/www/html:/srv /var/www/html is the local folder where I have the files to serve. I mount in the container folder that Caddy use to serve files.

-v $HOME/Caddyfile/phphttps:/etc/Caddyfile $HOME/Caddyfile/phphttps is my Caddy configuration file., {
fastcgi / php
startup php-fpm7
log stdout
errors stdout

-v $HOME/.caddy:/root/.caddy I mount the folder where I will store the Let's Encrypt certificates that will be generated automatically the first time the container run, in order to prevent regenerating them each time.

Let's Encrypt Auto SSL

Note that this does not work on local environments.

You must use a valid domain properly configured to point your docker server and add email to your Caddyfile to avoid prompt at runtime.