Public | Automated Build

Last pushed: 2 years ago
Short Description
An experiment for creating a tiny docker container. It will just run my mini webserver (dweb).
Full Description


An experiment to create a tiny docker container. I don't plan to use this for anything specific, but
I just wanted to create something working in Docker that wasn't huge ;-)

This will build a small docker container that just contains my mini-webserver, dweb. I have compiled
dweb with the gcc -static flag. I also used upx to pack down the binary size. This gives a small
standalone webserver (and nothing else). I'm hoping that the image will come in under 400k.


You need to tell docker run to mount a volume as /www which will contain the files being served up.

So ... to serve the files in your current directory on port 8080, it could be used like this:

docker run --rm -v ${PWD}:/www -p 8080:8080 davidsblog/tinydockerwebserver

This will mean that the webserver is running in the Docker container, but the files being served are on the host.

Docker Pull Command
Source Repository