A faster dockerTools.buildImage prototype

This is a lot like streamLayeredImage , with differences being a new layer splitting strategy and a system -independent representation.

Yep, there are several similarities and streamLayeredImage is a nice thing.

Correct me if i’m wrong, but each time you load an image with streamLayeredImage, you need to recompute the digest of all layers. With the presented prototype, digests are computed at build time (almost per layer) so when Skopeo pushes an image, it can immediately skips already pushed layers: if you develop with containers, containers need to be rebuilt/reloaded as fast as possible (cc Arion :wink:).

In terms of user experience, i’m not sure streaming a tar on stdout is really convenient. I think having intermediate files is pretty useful to understand what is happening.

Also, i would like to reduce the amount of container custom code in nixpkgs: Skopeo has all stuffs to push/load images: it would be nice to reuse this instead of rewriting it. Moreover, the proposed Skopeo transport could used by other projects (Guix or Bazel for instance).