Sign inSign up

wo0ki/lighthttpd

By wo0ki

•Updated over 6 years ago

Image
0

159

wo0ki/lighthttpd repository overview

Docker Pulls Build Status GitHub issues


The default build of this image is really just a clean install of lighttpd on Alpine Linux. The only change I made is adding minimal configuration for ssl and include a self signed certificate. Further customization magic should happen during docker run. Copies of the lighttpd config files can be found in ./config/lighttpd.

⁠Build Examples

The default build looks like this and runs against the latest version of alpine available.

docker build -t username/lighttpd:latest .

Same as above explicitly

docker build -t username/lighttpd:latest --build-arg alpine_version=latest .

Building against an older alpine version. Tested with 3.10 and 3.8

docker build -t username/lighttpd:alpine-3.10 --build-arg alpine_version=3.10 .

⁠Run examples

docker run \
	--detach \
	--name lighttpd \
	--mount type=bind,source=/etc/localtime,destination=/etc/localtime,readonly=true \
	--mount type=bind,source=$PWD/htdocs,destination=/var/www/localhost/htdocs \
	--publish 8080:80 \
	--publish 8443:443 \
	m4rcu5/lighttpd:latest

The above will start a detached container named lighttpd with a bind-mount for /etc/localtime to match the container's timezone with it's host and a bind-mount for a host dir as webroot. It publishes port the container's port 80 as the host's port 8080 and container port 443 as the hosts port 8443.

docker run \
	--detach \
	--name lighttpd \
	--mount type=bind,source=/etc/localtime,destination=/etc/localtime,readonly=true \
	--mount type=bind,source=$PWD/htdocs,destination=/var/www/localhost/htdocs \
	--mount type=bind,source=$PWD/config/lighttpd,destination=/etc/lighttpd,readonly=true \
	--publish 8080:80 \
	--publish 8443:443 \
	m4rcu5/lighttpd:latest

Pretty much the same as the previous example, only it mounts lighttpd config files from the host filesystem for extra customization. If you do this, either provide a valid ssl certificate as config/lighttpd/ssl/localhost.pem or update lighttpd.conf and/or ssl.conf to match your project.

Tag summary

Content type

Image

Digest

Size

6.9 MB

Last updated

over 6 years ago

docker pull wo0ki/lighthttpd