# A faster dockerTools.buildImage prototype

**URL:** https://discourse.nixos.org/t/a-faster-dockertools-buildimage-prototype/16922
**Category:** Announcements
**Created:** [January 1, 2022, 6:04pm UTC](https://discourse.nixos.org/t/a-faster-dockertools-buildimage-prototype/16922 "2022-01-01T18:04:24Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![lewo](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lewo/32/4913_2.png) [@lewo](https://discourse.nixos.org/u/lewo)
#### Post date: [January 2, 2022, 9:49am UTC](https://discourse.nixos.org/t/a-faster-dockertools-buildimage-prototype/16922/3 "2022-01-02T09:49:33Z")

</div>

> 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 😉).

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).

---

_[View the full topic](https://discourse.nixos.org/t/a-faster-dockertools-buildimage-prototype/16922)._
