3 ms·
> will place inside everything needed And more. In my experience, depending on the quality of the packages you happen to be consuming, you may end up with a co
by aliasxneo 3y ago
> will place inside everything needed
And more. In my experience, depending on the quality of the packages you happen to be consuming, you may end up with a container twice as large as a comparable (say, Alpine) container. For example, I once tried to bring git into my Nix container and was surprised to see over 300MB in increased size.
After having built Nix containers exclusively for a year now, I wouldn't really recommend it to others unless you're willing to invest a lot of additional time cleaning up community packages.
- takeda 3y agoThat'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.