To use nix for building this image: nix-build . it'll give a file "result" that you can load in docker: docker load < result