Hello Ricardo,

I greatly agree, it would be an awesome QOL improvement.

Just want to mention that it might be nice to take inspiration from the Nix dockerTools, since they already have quite a lot of effort put into this.

Including for example an option called `streamLayeredImage` [1] which doesn't generate a tarball at all, but rather a script that outputs the layers without assembling them, in a format which Docker or Podman can import without the huge intermediary file.

i.e. $(guix pack ...) | docker load

[1]: https://ryantm.github.io/nixpkgs/builders/images/dockertools/#ssec-pkgs-dockerTools-streamLayeredImage

So that'd allow Guix to skip generating the final tarball altogether, which makes packing very swift. Also seems that Nix's way only quickly imports the changed layers? And Guix's always imports the whole thing, at least I think?

Reading through how they do it, it seems that they pass the raw store paths to this python script [2] and it does the rest? Save for figuring out some merging of paths since there's a limit to the number of layers, I don't think this would be too difficult to port (after we find what license the script is under at least, or replicate the behaviour in Guile).

[2]: https://github.com/NixOS/nixpkgs/blob/90509d6d66eb1524e2798a2a8627f44ae413f174/pkgs/build-support/docker/stream_layered_image.py


What do you think?

---

Atlas

Reply via email to