diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-08-17 12:01:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 12:01:28 +0000 |
commit | 954d3734e9adf3d19ef2cf340a9cf14b9f66080a (patch) | |
tree | a3c6ac74d3d5078dd326dd323686d2889f7cdba7 /pkgs/build-support | |
parent | af42060d6168d6eab751f33685c4b3fa1fab2027 (diff) | |
parent | c085fe3e5ae411bcce050e61a84b418e38c8235b (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/docker/default.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 39008df74f179..7468f056005af 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -205,6 +205,7 @@ rec { , fromImageName ? null , fromImageTag ? null , diskSize ? 1024 + , buildVMMemorySize ? 512 , preMount ? "" , postMount ? "" , postUmount ? "" @@ -218,6 +219,7 @@ rec { destination = "./image"; }; inherit fromImage fromImageName fromImageTag; + memSize = buildVMMemorySize; nativeBuildInputs = [ util-linux e2fsprogs jshon rsync jq ]; } '' @@ -407,6 +409,8 @@ rec { fromImageTag ? null , # How much disk to allocate for the temporary virtual machine. diskSize ? 1024 + , # How much memory to allocate for the temporary virtual machine. + buildVMMemorySize ? 512 , # Commands (bash) to run on the layer; these do not require sudo. extraCommands ? "" }: @@ -418,7 +422,7 @@ rec { runWithOverlay { name = "docker-layer-${name}"; - inherit fromImage fromImageName fromImageTag diskSize; + inherit fromImage fromImageName fromImageTag diskSize buildVMMemorySize; preMount = lib.optionalString (copyToRoot != null && copyToRoot != [ ]) '' echo "Adding contents..." @@ -517,6 +521,8 @@ rec { runAsRoot ? null , # Size of the virtual machine disk to provision when building the image. diskSize ? 1024 + , # Size of the virtual machine memory to provision when building the image. + buildVMMemorySize ? 512 , # Time of creation of the image. created ? "1970-01-01T00:00:01Z" , # Deprecated. @@ -563,7 +569,7 @@ rec { mkRootLayer { name = baseName; inherit baseJson fromImage fromImageName fromImageTag - keepContentsDirlinks runAsRoot diskSize + keepContentsDirlinks runAsRoot diskSize buildVMMemorySize extraCommands; copyToRoot = rootContents; }; |