Skip to content

mthird/docker-caddy

 
 

Repository files navigation

Caddy web server

Image Size  Docker Registry  Circle CI

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)

About

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.

Middleware

The following middleware is installed in the image:

See fixtures/caddyfile for an example config used to test this image.

License

See LICENSE.md in this git repo.

How-to

Build

⚠️ Build requires Docker 1.6.0 or later (for 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.

Pull an already-built image

# All tags, where each tag follows the pattern
# jumanjiman/caddy:${CADDY_VERSION}-${BUILD_DATE}T${BUILD_TIME}-git-${HASH}
docker pull -a jumanjiman/caddy

Run

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

About

https://github.com/mholt/caddy web server in a tiny docker container based on alpine linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 100.0%