Nix is a package manager, and Docker is a tool for running containers. Nix allows sandboxed builds, but only when running the daemon as root. That's not always possible (corporate) but Docker is more commonly available. So, we use the sandboxing features of Docker for producing builds with Nix.
Makefileis the entry point. Runmake nixto build thedefault.nixexpressiondefault.nixdescribes what we would like to buildDockerfiledescribes the container that is used for building