Sign inSign up

smtudor/caddy

By smtudor

Updated almost 11 years ago

Caddy is a lightweight, general-purpose web server.

Image
0

2.1K

smtudor/caddy repository overview

Based on abiosoft/caddy, but with Hugo added

caddy-docker

A Docker image for Caddy. This image includes the git and Hugo addons.

Getting Started

Serve current directory
$ docker run -d -v `pwd`:/srv -p 2015:2015 smtudor/caddy

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

Using git sources

Caddy can serve sites from git repository using git middleware.

Create Caddyfile

Replace github.com/abiosoft/webtest with your repository.

$ prinf "0.0.0.0\ngit github.com/abiosoft/webtest" > Caddyfile
Run the image
$ docker run -d -v `pwd`/Caddyfile:/etc/Caddyfile -p 2015:2015 smtudor/caddy

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

Usage

Default Caddyfile

The image contains a default Caddyfile.

0.0.0.0
browse
Paths in container

Caddyfile: /etc/Caddyfile

Sites root: /srv

Using local Caddyfile and sites root

Replace /path/to/Caddyfile and /path/to/sites/root accordingly.

$ docker run -d -v /path/to/sites/root:/srv -v path/to/Caddyfile:/etc/Caddyfile -p 2015:2015 smtudor/caddy

Tag summary

Content type

Image

Digest

sha256:a545021b1

Size

72.1 MB

Last updated

almost 11 years ago

docker pull smtudor/caddy