4 ms·
One thing I like with Nix is that it can build containers, so it's totally compatible with deployment systems that require containers. I don't mean using Nix co
by tikhonj 5y ago
One thing I like with Nix is that it can build containers, so it's totally compatible with deployment systems that require containers. I don't mean using Nix commands in a Dockerfile, I mean having a Nix derivation that produces a container.
I've been writing normal Dockerfiles at work recently and the whole toolchain is annoying on multiple fronts; I'd love to jump to Nix instead, except it's really hard to convince other people to learn non-trivial technology that's off the beaten path :(.
- the_duke 5y agoI 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