Re:Build Your Own Docker with Linux Namespaces, Cgroups, and...
by takeda on Tuesday June 27, 2023 @11:58AM
(#36494657)
That's because by default Nix uses glibc (which is huge), while Alpine uses musl. You can create musl binaries, but you need to know Nix a little more and know how to cross compile.
Another great thing is that you can can easily modify existing package to remove some of their dependencies that you don't use.
Another great thing is that you can can easily modify existing package to remove some of their dependencies that you don't use.
This is shown here with packaging redis into a container here and making it 3x smaller than the alpine version: https://nixos.org/#asciinema-demo-cover
There's of course possibility that someone specified build dependency as a runtime dependency, but if that was done that's a bug.