summaryrefslogtreecommitdiff
path: root/pkgs/build-support/docker/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/docker/default.nix')
-rw-r--r--pkgs/build-support/docker/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix
index 5e66c81e4ff9..5bbf1b63f2b0 100644
--- a/pkgs/build-support/docker/default.nix
+++ b/pkgs/build-support/docker/default.nix
@@ -37,6 +37,10 @@
let
+ inherit (lib)
+ optionals
+ ;
+
mkDbExtraCommand = contents: let
contentsList = if builtins.isList contents then contents else [ contents ];
in ''
@@ -787,6 +791,10 @@ rec {
# We pick 100 to ensure there is plenty of room for extension. I
# believe the actual maximum is 128.
maxLayers ? 100,
+ # Whether to include store paths in the image. You generally want to leave
+ # this on, but tooling may disable this to insert the store paths more
+ # efficiently via other means, such as bind mounting the host store.
+ includeStorePaths ? true,
}:
assert
(lib.assertMsg (maxLayers > 1)
@@ -834,7 +842,9 @@ rec {
'';
};
- closureRoots = [ baseJson ] ++ contentsList;
+ closureRoots = optionals includeStorePaths /* normally true */ (
+ [ baseJson ] ++ contentsList
+ );
overallClosure = writeText "closure" (lib.concatStringsSep " " closureRoots);
# These derivations are only created as implementation details of docker-tools,