https://github.com/portier/portier-broker/blob/master/Docker...
This uses the awesome clux/muslrust Docker image as a build environment, then copies the result into a new ‘from scratch’ layer.
Works great with Haskell statically compiled binaries. Running the binary through UPX i've managed to get small HTTP microservices down to a 2MB docker image with just Scratch.
Edit: I really should have read the article first. It uses Go binaries as the example. Good to know Haskell folks are also using it.
See https://medium.com/@lizrice/non-privileged-containers-based-...
https://docs.docker.com/engine/reference/builder/#user
You can use `setcap` to grant capabilities to the binary or the `pam_cap` module if you need to do capabilities per user.
I haven't run across the need to run most containers as root for a while now.
http://appfs.rkeene.org/web/artifact/42acc0ed9e8f4327
init comes from: http://appfs.rkeene.org/web/artifact/ecb8eda1cfb32ecc
And just sets up some symlinks and starts appfsd, followed by running bash (which is cached and run transparently).
For example I created a cntlm base image (linked in another comment)
From there I can do
FROM my_base_image COPY whatever
and then add layers of services
first one is proxy
second one could be queue service (for example http://nsq.io)
then a message server, that just sends notifications
etc. etc. etc.
The same could be achieved downloading and configuring the static binaries, but Docker packaging, security and network separation makes evrything a little bit easier