https://github.com/m4rcu5nl/docker-lighttpd-alpine
~ 15MB lighttpd Docker image
https://github.com/m4rcu5nl/docker-lighttpd-alpine
alpine-linux docker-image lighttpd
Last synced: about 1 year ago
JSON representation
~ 15MB lighttpd Docker image
- Host: GitHub
- URL: https://github.com/m4rcu5nl/docker-lighttpd-alpine
- Owner: m4rcu5nl
- Created: 2017-03-10T00:26:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-15T07:54:56.000Z (almost 3 years ago)
- Last Synced: 2025-03-24T18:21:29.502Z (about 1 year ago)
- Topics: alpine-linux, docker-image, lighttpd
- Language: Dockerfile
- Homepage:
- Size: 28.3 KB
- Stars: 11
- Watchers: 1
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://hub.docker.com/r/m4rcu5/lighttpd/) [](https://travis-ci.org/m4rcu5nl/docker-lighttpd-alpine) [](https://github.com/m4rcu5nl/docker-lighttpd-alpine/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`.
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.