3 ms·
Docker provides a solution for balls of mud. You now have a more reproducible ball of mud! Bazel and company require you to clean up your ball of mud first. So
by rtpg 5y ago
Docker provides a solution for balls of mud. You now have a more reproducible ball of mud!
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
- ParetoOptimal 5y ago> 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.
- rtpg 5y agoCan you generate a tar file that you can “just run“ (or something to that effect)? My impression was that Nix works more like a package installer, but deterministic
- rekado 5y ago`guix pack` (with its various options) can produce an archive that you could run after unpacking anywhere.
- henrydark 5y agoThere might be quicker ways to do this, but with one extra line a derivation exports a docker image which can in turn be turned to a tar with one more line. 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
- mananaysiempre 5y agoWith the new (nominally experimental) CLI, use `nix bundle --bundler github:NixOS/bundlers#toArx` (or equivalently just `nix bundle`) to build a self-extracting shell script[1], `...#toDockerImage` to build a Docker image, etc.[2,3], though there’s no direct AppImage support that I can see (would be helpful to eliminate the startup overhead caused by self-extraction). 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 https://github.com/solidsnack/arx [2] https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-bundle.html https://nixos.org/manual/nix/unstable/command-ref/new-cli/ni... [3] https://github.com/NixOS/bundlers https://github.com/NixOS/bundlers [4] https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-dockerTools https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-dockerTool...