From 2e6a16f2bdd32d9efc444285c559d1eac18212cc Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 12 Aug 2019 19:56:57 -0400 Subject: [PATCH 1/3] dockerTools: document extraCommands --- doc/functions/dockertools.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/functions/dockertools.xml b/doc/functions/dockertools.xml index 3e9281557d511f..3e5b76756e2f64 100644 --- a/doc/functions/dockertools.xml +++ b/doc/functions/dockertools.xml @@ -316,6 +316,19 @@ hello latest de2bf4786de6 About a minute ago 25.2MB + + + extraCommands optional + + + + Commands to run while building the final layer, without access + to most of the layer contents. Changes to this layer are "on top" + of all the other layers, so can create additional directories + and files. + + +
From 8adaae2df21852806782e659947bd7e3ff86eee5 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 12 Aug 2019 19:59:40 -0400 Subject: [PATCH 2/3] dockertools.buildLayeredImage: default layer count up to 100 --- doc/functions/dockertools.xml | 5 ++++- pkgs/build-support/docker/default.nix | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/functions/dockertools.xml b/doc/functions/dockertools.xml index 3e5b76756e2f64..e2ea2f7b976b63 100644 --- a/doc/functions/dockertools.xml +++ b/doc/functions/dockertools.xml @@ -312,7 +312,10 @@ hello latest de2bf4786de6 About a minute ago 25.2MB Maximum number of layers to create. - Default: 24 + Default: 100 + + + Maximum: 125 diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index ae3d93ff3db392..83e21c8945dc51 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -291,9 +291,10 @@ rec { # Files to add to the layer. closure, configJson, - # Docker has a 42-layer maximum, we pick 24 to ensure there is plenty - # of room for extension - maxLayers ? 24 + # Docker has a 125-layer maximum, we pick 100 to ensure there is + # plenty of room for extension. + # https://github.com/moby/moby/blob/b3e9f7b13b0f0c414fa6253e1f17a86b2cff68b5/layer/layer_store.go#L23-L26 + maxLayers ? 100 }: let storePathToLayer = substituteAll From abf82a18fb22d4d2805f7d3985d484fbe133fb68 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 15 Aug 2019 09:47:05 -0400 Subject: [PATCH 3/3] doc/functions/dockertools.xml: clarify that "Commands" means shell commands Co-Authored-By: Jon --- doc/functions/dockertools.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/functions/dockertools.xml b/doc/functions/dockertools.xml index e2ea2f7b976b63..a284182bb047c1 100644 --- a/doc/functions/dockertools.xml +++ b/doc/functions/dockertools.xml @@ -325,7 +325,7 @@ hello latest de2bf4786de6 About a minute ago 25.2MB - Commands to run while building the final layer, without access + Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.