From c9e6a02c822936b2d9156151031f40d6c2e5435d Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Mon, 22 Jun 2020 15:11:46 +1200 Subject: Add docs for dockerTools.streamLayeredImage --- doc/builders/images/dockertools.xml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/builders/images/dockertools.xml b/doc/builders/images/dockertools.xml index e7f37fdaaf0..126698d0a9e 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: + + +
+
pullImage -- cgit 1.4.1