2 ms·
I second that. Using nix for building docker images [1] is brilliant, especially when combined with flakes. You don't need messy shell scripts to set up the en
by the_duke 5y ago
I second that.
Using nix for building docker images [1] is brilliant, especially when combined with flakes.
You don't need messy shell scripts to set up the environment and can get 100% reproducibility.
You just build a regular Nix derivation (aka package) with the software you need and then just specify that in your image.
It does take some work to get the image size down though.
I'll also mention Nixery [2], which is a Docker registry that automatically builds images based on Nix.
[1] https://nix.dev/tutorials/building-and-running-docker-images https://nix.dev/tutorials/building-and-running-docker-images
[2] https://github.com/tazjin/nixery https://github.com/tazjin/nixery