This project: [https://github.com/jumanjihouse/docker-caddy] (https://github.com/jumanjihouse/docker-caddy)
Docker image: [https://registry.hub.docker.com/u/jumanjiman/caddy/] (https://registry.hub.docker.com/u/jumanjiman/caddy/)
Upstream Caddy: [https://github.com/mholt/caddy] (https://github.com/mholt/caddy)
This git repo downloads golang source code from [https://github.com/mholt/caddy] (https://github.com/mholt/caddy) and builds a small docker image.
See [http://blog.gopheracademy.com/caddy-a-look-inside/] (http://blog.gopheracademy.com/caddy-a-look-inside/) and https://caddyserver.com/ to learn about Caddy.
The following middleware is installed in the image:
See fixtures/caddyfile
for an example config used to test this image.
See LICENSE.md in this git repo.
docker build -f <dockerfile>
).
make all
The above command builds a caddybuild
image, which uses
caddyext
to build a static binary. It then copies the static binary
out of the build image and creates a runtime image, caddy
.
caddyext
makes it easy to add middleware to the static binary.
The runtime image does not have developer tools or source code.
The runtime image is based on Alpine, not Scratch, to enable
middleware that depends on external tools, such as git
.
# All tags, where each tag follows the pattern
# jumanjiman/caddy:${CADDY_VERSION}-${BUILD_DATE}T${BUILD_TIME}-git-${HASH}
docker pull -a jumanjiman/caddy
Create a config in some directory on your host, then:
docker run -d \
-p 2020:2020 \
--name caddy \
-v /path/to/configdir:/etc/caddy \
--read-only \
--cap-drop all \
jumanjiman/caddy -conf /etc/caddy/caddyfile