I have recently been doing some work with Kubernetes, and wanted to put together a minimal image with which I could test service and pod deployment. Size in this case was critical: I wanted something that would download quickly when initially deployed, because I am often setting up and tearing down Kubernetes as part of my testing (and some of my test environments have poor external bandwidth).
Building thttpd
My go-to minimal webserver is thttpd. For the normal case,
building the software is a simple matter of ./configure followed by
make. This gets you a dynamically linked binary; using ldd you
could build a Docker image containing only the necessary shared
libraries: