dockerTools.buildLayeredImage: fix image with only 2 layers

A test is also added to ensure an image with 2 layers can be built.
This commit is contained in:
Antoine Eiche
2020-01-30 21:09:44 +01:00
parent 8539d5f48f
commit 283bcc1003
3 changed files with 14 additions and 2 deletions
+8
View File
@@ -238,4 +238,12 @@ rec {
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
};
# 15. Create a layered image with only 2 layers
two-layered-image = pkgs.dockerTools.buildLayeredImage {
name = "two-layered-image";
tag = "latest";
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
contents = [ pkgs.bash pkgs.hello ];
maxLayers = 2;
};
}