5 ms·
The claimed advantages of Docker over Nix here don't line up with the reality I've seen after years of experience with Docker and Nix, particularly with how the
by colemickens 8y ago
The claimed advantages of Docker over Nix here don't line up with the reality I've seen after years of experience with Docker and Nix, particularly with how they relate to services that wind up deployed with Kubernetes.
I can do almost all the same things that you do with Docker, with Nix. Why would I ever need a different base image if I'm composing my image with Nix? Nix+Docker is the best of both worlds and there's really absolutely no reason to not pair them together.
Besides if for some reason, you can't package something in Nix, or refuse to buy into the `nixpkgs` ecosystem, you can still build a reproducible Docker image with whatever base layer you want (`alpine`, `redis`, whatever), with Nix, and benefit from all of the benefits mentioned in this post and others in this thread.
Deployment time, yeah, they're all opaque containers and they can be running whoknowswhat. But for day to day development, Nix absolutely beats Docker. I've spent way too much of my life rebuilding binaries and container images that already exist. Wasted too much of my life on containers and binaries of unknown, unreproducible origins. None of those things are concerns when you're building your container images with Nix. They're not even a thought I have any more.