mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
dockerTools.buildLayeredImage: assert maxLayers > 1
Since a layer is reserved for "customization", the image can not contains less than 2 layers. The user gets the following message at evaluation: nix-instantiate nixos/tests/docker-tools.nix trace: the maxLayers argument of dockerTools.buildLayeredImage function must be greather than 1 (current value: 1)
This commit is contained in:
parent
283bcc1003
commit
01a68479cc
|
@ -545,6 +545,9 @@ rec {
|
|||
# believe the actual maximum is 128.
|
||||
maxLayers ? 100
|
||||
}:
|
||||
assert
|
||||
(lib.assertMsg (maxLayers > 1)
|
||||
"the maxLayers argument of dockerTools.buildLayeredImage function must be greather than 1 (current value: ${toString maxLayers})");
|
||||
let
|
||||
baseName = baseNameOf name;
|
||||
contentsEnv = symlinkJoin {
|
||||
|
|
Loading…
Reference in a new issue