3 ms·
The main difference between Dockerfiles and something like Nix is that the former is run "internally" and the latter "externally". For example, a Dockerfile co
by chriswarbo 5y ago
The main difference between Dockerfiles and something like Nix is that the former is run "internally" and the latter "externally".
For example, a Dockerfile containing 'my-package-manager install foo' will create an image with foo and my-package-manager (which usually involves an entire OS, and at least a shell, etc.). An image built with Nix will only contain foo and its dependencies.
Note that it's actually quite easy to make container images "externally", using just `tar`, `jq` and `sha256sum`. The nice thing about using Nix for this (rather than, e.g. Make) is the tracking of dependencies, all the way down to the particular libc, etc.