4 ms·
having deterministic/reproducible/reverting/history/etc with Ubuntu Looking at the recipes this seems to be non-deterministic/reproducible. E.g. add-apt-r
by danieldk 6y ago
having deterministic/reproducible/reverting/history/etc with Ubuntu
Looking at the recipes this seems to be non-deterministic/reproducible. E.g.
add-apt-repository -y ppa:longsleep/golang-backports && apt-get update
From: https://github.com/pauldotknopf/darch-recipes/blob/502fb3d66c61fccd80a6079d0613dfe9385470b7/recipes/development/script#L6 https://github.com/pauldotknopf/darch-recipes/blob/502fb3d66...
There is no guarantee that you will get exactly the same Go version when rebuilding an image. And all the scripts seem like that: ad-hoc wget and apt command, where package versions, how they are built, etc. can change between runs.
This is only a very weak notion of reproducibility: if the scripts run, you will get an image with the same packages. Nix/Guix guarantee that you get exactly the same versions, built in exactly the same way, from your own package down to transitive dependencies such as glibc or zlib.
(I am not criticizing the project, it may be great, but it is just not reproducible/deterministic.)
- pknopf 6y agoSure, it's not bit-for-bit like Nix and friends, but it's as predictable as you'd expect "docker pull ubuntu:bionic" to be, which is perfectly reasonable/comfortable for desktop scenarios.
- takeda 6y agoIt's as reproducible as a bash script that you call on first boot to configure your machine.
- pknopf 6y agoYeah, and? Darch does a lot more than just that. 1. Temporary boots. You can "sudo rm -rf /", reboot, and all is well. You can play around with "apt-get install" without having to commit to your changes being persistent. 2. Checkpoints. Each "bash script that you call on first boot" is versioned and you can easily revert back to any image at any point, as simple as running either "docker run ubuntu:bionic" or "docker run ubuntu:focal". 3. Store your builds in Docker Hub (https://hub.docker.com/repository/docker/pauldotknopf/darch-ubuntu-development https://hub.docker.com/repository/docker/pauldotknopf/darch-...) so that the same resulting image can be run on any of your machines via "darch images pull your-image && darch stage upload your-image". Your bash-script approach to building a fresh machine would be a lot more involved than: 1. Make changes to your script. 2. Check in a push to repo. 3. Wait for CI build to push to Docker Hub. 4. "darch images pull my-new-image && darch stage upload my-new-image" 5. Reboot. 6. Enjoy.
- takeda 6y agoYou still can create a chroot using bash script, it's nothing new and you can do it in any system including NixOS. I find something like this[1] far more useful, because it actually has some applications. [1] https://grahamc.com/blog/erase-your-darlings https://grahamc.com/blog/erase-your-darlings
- pknopf 6y agoThat is a complicated way to achieve the same thing Darch does. I'd prefer to not learn a new DSL. Packages and products are more widely supported on Ubuntu/Debian. In the end, I just want to work and play, not learn a new DSL, while having everything in the article you shared.
- takeda 6y agoThis is not the same thing darch does, what darch does can be done by chroot, namespaces etc and is not that complicated.
- pknopf 6y agoOf course, the tech is different. I meant the end-goal being achieved is the same. > what darch does can be done by chroot, namespaces etc and is not that complicated. Exactly my point.
- RaitoBezarius 6y agoNo, it's really not the same thing. You have a very weak reproducibility which relies on Docker's implementation details and a lot of impurities. In contrary, NixOS has very fine-grained reproducibility (and is not perfect of course) but get us very far [1] [1]: https://r13y.com/ https://r13y.com/
- pknopf 6y agoIt's close enough for desktop purposes, especially for people not willing to make the plunge into a new world with its own DSL. You don't really hear people complain about the reproducibility of "docker pull ubuntu:bionic".