Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Just a simple Dockerfile for running a CaddyServer in a Docker container.

License

Notifications You must be signed in to change notification settings

QantumEntangled/CaddyServer-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Quick Start

You can run a simple CaddyServer Configuration with the following command:

$ docker run -d \
		-p 80 -p 443 --name mycaddyserver \
		qantumentangled/CaddyServer-Docker

But you might also want to pass in a CaddyFile configuration file that you've already written, do this by adding -e CADDYFILE=</path/to/CaddyFile> to your command.

$ docker run -d \
		-p 80 -p 443 --name mycaddyserver \
		-e CADDYFILE=</path/to/CaddyFile> \
		qantumentangled/CaddyServer-Docker

You can edit the CaddyFile later by running

$ docker cp mycaddyserver:/etc/CaddyFile </path/to/destination>

For information on writing your CaddyFile configuration see the CaddyServer Docs

Full Configuration

To include plugins in CaddyServer you'll need to pass in the names of the plugins you want during initial setup via environment variables

docker run -d \
		-p 80 -p 443 --name mycaddyserver \
		-e CADDYFILE=</path/to/CaddyFile> \
		-e PLUGINS=<comma,separated,listof,plugins> \
		qantumentangled/CaddyServer-Docker

To map a directory from the host machine into the CaddyServer container you can add the -v </host/path>:</CaddyServer/path> as well. This is useful if you want to edit your web files from the host, but serve them via the CaddyServer Container.

docker run -d \
		-p 80 -p 443 --name mycaddyserver \
		-e CADDYFILE=</path/to/CaddyFile> \
		-e PLUGINS=<comma,separated,listof,plugins> \
		-v </path/in/host>:</path/in/CaddyServer> \
		qantumentangled/CaddyServer-Docker

*Note: You could also do this with the CaddyFile but it is not recommended.

For information on writing your CaddyFile configuration see the CaddyServer Docs

About

Just a simple Dockerfile for running a CaddyServer in a Docker container.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published