diff --git a/doc/builders/images/dockertools.xml b/doc/builders/images/dockertools.xml
index e7f37fdaaf00..126698d0a9ed 100644
--- a/doc/builders/images/dockertools.xml
+++ b/doc/builders/images/dockertools.xml
@@ -166,7 +166,7 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
buildLayeredImage
- Create a Docker image with many of the store paths being on their own layer to improve sharing between images.
+ Create a Docker image with many of the store paths being on their own layer to improve sharing between images. The image is realized into the Nix store as a gzipped tarball. Depending on the intended usage, many users might prefer to use streamLayeredImage instead, which this function uses internally.
@@ -327,6 +327,27 @@ pkgs.dockerTools.buildLayeredImage {
+
+ streamLayeredImage
+
+
+ Builds a script which, when run, will stream an uncompressed tarball of a Docker image to stdout. The arguments to this function are as for buildLayeredImage. This method of constructing an image does not realize the image into the Nix store, so it saves on IO and disk/cache space, particularly with large images.
+
+
+
+ The image produced by running the output script can be piped directly into docker load, to load it into the local docker daemon:
+
+
+
+ Alternatively, the image be piped via gzip into skopeo, e.g. to copy it into a registry:
+
+
+
+