You might be interested in this article that compares nix and docker. It explains why docker builds are not considered reproducible:
For example, a Dockerfile will run something like apt-get-update as one of the first steps. Resources are accessible over the network at build time, and these resources can change between docker build commands. There is no notion of immutability when it comes to source.
and why nix builds are a lot of the time:
Builds can be fully reproducible. Resources are only available over the network if a checksum is provided to identify what the resource is. All of a package’s build time dependencies can be captured through a Nix expression, so the same steps and inputs (down to libc, gcc, etc.) can be repeated.
Containerization has other advantages though (security) and you can actually use nix’s reproducible builds in combination with (docker) containers.
LGUG2Z@lemmy.world 1 year ago
Highly recommended viewing if you’d like to learn more about the limits of reproducibility in the Docker ecosystem.
PipedLinkBot@feddit.rocks [bot] 1 year ago
Here is an alternative Piped link(s): piped.video/watch?v=pfIDYQ36X0k
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I’m open-source, check me out at GitHub.
CodeBlooded@programming.dev 1 year ago
I’m going to give it a watch. Thanks for sharing!