nixos/tests/docker-tools: check layer sharing with buildLayeredImage

Adapted from grahamc's blog post on layered Docker images in Nix:

https://grahamc.com/blog/nix-and-layered-docker-images
This commit is contained in:
Daniël de Kok
2019-06-06 15:03:08 +02:00
parent 7e6756af41
commit 3b0d5b5ed3
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -226,4 +226,12 @@ rec {
'';
};
# 14. Create another layered image, for comparing layers with image 10.
another-layered-image = pkgs.dockerTools.buildLayeredImage {
name = "another-layered-image";
tag = "latest";
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
contents = [ pkgs.hello ];
};
}