Neat! Maybe out of place but is there something similar where a virtual machine is spun up rather than docker?
Do you know if there's an easy way to generate a Docker container from a Nix script? That could be a very nice alternative to a Dockerfile.
{ pkgs ? import <nixpkgs> {} }:
with pkgs; dockerTools.buildLayeredImage {
name = "curl-bash";
contents = [ curl bashInteractive coreutils ];
}
Putting that in a file and calling `nix-build` on that file will give you a tarball that Docker will happily load using `docker load`.Doing this has a lot of advantages over Dockerfiles, see this blog post for some of the others: https://grahamc.com/blog/nix-and-layered-docker-images