1. 3
    1. 2

      I’ve done a very similar thing using Alpine and multi-stage builds. Using alpine:edge also gives you upx, which lets you compress your binary after the build, which you copy into the next stage, and using ldd you can figure out exactly which libraries are needed for dynamic linking, and you can end up with some really tiny images. Also using GHC’s split objects you can build even smaller binaries. Maybe I should write a post about that sometime soon, once we actually put this into production…

      1. 1

        Please do create that blog post! I’ve not used upx, got any links that explain that?