dockerTools: Test changing compression of `buildLayeredImage`

This commit is contained in:
Jonas Fierlings 2024-02-28 12:06:56 +01:00
parent 7e1f7217d5
commit f73a079352
No known key found for this signature in database
2 changed files with 25 additions and 1 deletions

View File

@ -178,6 +178,14 @@ in {
"docker load --input='${examples.bashUncompressed}'",
"docker rmi ${examples.bashUncompressed.imageName}",
)
docker.succeed(
"docker load --input='${examples.bashLayeredUncompressed}'",
"docker rmi ${examples.bashLayeredUncompressed.imageName}",
)
docker.succeed(
"docker load --input='${examples.bashLayeredZstdCompressed}'",
"docker rmi ${examples.bashLayeredZstdCompressed.imageName}",
)
with subtest(
"Check if the nix store is correctly initialized by listing "

View File

@ -509,7 +509,23 @@ rec {
contents = pkgs.bashInteractive;
};
# buildImage without explicit tag
# buildLayeredImage without compression
bashLayeredUncompressed = pkgs.dockerTools.buildLayeredImage {
name = "bash-layered-uncompressed";
tag = "latest";
compressor = "none";
contents = pkgs.bashInteractive;
};
# buildLayeredImage with zstd compression
bashLayeredZstdCompressed = pkgs.dockerTools.buildLayeredImage {
name = "bash-layered-zstd";
tag = "latest";
compressor = "zstd";
contents = pkgs.bashInteractive;
};
# streamLayeredImage without explicit tag
bashNoTagStreamLayered = pkgs.dockerTools.streamLayeredImage {
name = "bash-no-tag-stream-layered";
contents = pkgs.bashInteractive;