Hacker News new | ask | show | jobs
by midchildan 1036 days ago
It's really not. Docker is a tool for binary distribution. Docker images are those binaries. Dockerfiles used to create Docker images don't have any mechanism to ensure reproducibility whatsoever. Unlike Nix, you can't take a Dockerfile and expect builds to succeed.

Furthermore, Docker images are monoliths that's isolated from the system. Instead of system administrators choosing the isolation boundaries that best fits their requirements, the image packagers put walls around each and every image. As a result, Docker containers are inflexible compared to traditional Unix applications. Piecing together multiple Docker containers is a clunky experience.

In contrast, Nix is an integrated build/configuration/deployment system. Entire systems down to the package level can be reproduced from Nix expressions.

It also gives system administrators power over the whole process. Administrators have control over things like how each components are pieced together, and where isolation boundaries are placed. They can even make tweaks to the package build steps.

Docker can't substitute Nix. It's not a matter of elegance. Their features and capabilities are wildly different.

1 comments

I agree for the most part except I don't find that this matters in practice:

> Dockerfiles used to create Docker images don't have any mechanism to ensure reproducibility whatsoever

simply generate it once and keep it as an immutable artefact