3 ms·
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
by takeda 3y ago
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.
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 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.