by rtpg · 4y ago · 0 comments
Bazel and company require you to clean up your ball of mud first. So your payoff is further away (and can sometimes be theoretical)
Ultimately it’s less about Docker and more about tooling supporting reproducibility (apt but with version pinning please), but in the meantime Docker does get you somewhere and solve real problems without having to mess around with stuff too much.
And of course the “now you have a single file that you can run stuff with after building the image ”. I don’t believe stuff like Nix offers that
Yes it does? Also, any nix expression can trivially be built into a much more space efficient docker container.
If you want a QEMU VM for a complete system rather than a set of files for a single application, use `nixos-rebuild build-vm`, though that is intended more for testing than for deployment.
The Docker bundler seems to be using more general Docker-compatible infrastructure in Nixpkgs[4].
[1] https://github.com/solidsnack/arx
[2] https://nixos.org/manual/nix/unstable/command-ref/new-cli/ni...
[3] https://github.com/NixOS/bundlers
[4] https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-dockerTool...
Nix's image building is pretty neat. You can control how many layers you want, which I currently maximize so that docker pulls from AWS ECR are a lot faster