https://github.com/kugland/docker-darkhttpd
Serve static files with statically-linked darkhttpd.
https://github.com/kugland/docker-darkhttpd
container darkhttpd docker docker-image hardened http-server httpstatic static-server
Last synced: 25 days ago
JSON representation
Serve static files with statically-linked darkhttpd.
- Host: GitHub
- URL: https://github.com/kugland/docker-darkhttpd
- Owner: kugland
- License: mit
- Created: 2021-04-24T19:39:54.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-16T03:24:25.000Z (about 2 years ago)
- Last Synced: 2023-11-17T00:37:02.204Z (about 2 years ago)
- Topics: container, darkhttpd, docker, docker-image, hardened, http-server, httpstatic, static-server
- Language: Dockerfile
- Homepage:
- Size: 111 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-darkhttpd
   
This image uses [`darkhttpd`](https://unix4lyfe.org/darkhttpd/) to serve static files. This image
is built `FROM scratch` and the `darkhttpd` binary is statically linked, so as to make the image
very small. To use it, just mount your files (preferentially in read-only mode) into `/www` and,
if you like, expose port 80.
## Links
Page in GitHub: https://github.com/kugland/docker-darkhttpd
Page in DockerHub: https://hub.docker.com/r/kugland/darkhttpd
## Features
- Image has less than 300kb.
- Uses [mimetype map from nginx](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types).
- Runs as `nobody:nobody` (65534:65534).
- Runs in chroot.
- Directory listing disabled.
- Server ID disabled.
- Hardened binary.
## Example `docker-compose.yml`
```yml
version: '3.8'
services:
www:
image: kugland/darkhttpd:latest
volumes:
- "./www:/www:ro"
ports:
- "127.0.0.1:8000:80"
```
## Credits
This image was created by [André Kugland](https://github.com/kugland/).