dockerTools.streamLayeredImage: Add test for fakeRootCommands

This commit is contained in:
vroad
2021-04-07 18:11:02 +09:00
parent c420e650c9
commit 63e7c4186f
2 changed files with 21 additions and 0 deletions
+13
View File
@@ -441,4 +441,17 @@ rec {
tag = "latest";
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
};
# layered image with files owned by a user other than root
layeredImageWithFakeRootCommands = pkgs.dockerTools.buildLayeredImage {
name = "layered-image-with-fake-root-commands";
tag = "latest";
contents = [
pkgs.pkgsStatic.busybox
];
fakeRootCommands = ''
mkdir -p ./home/jane
chown 1000 ./home/jane
'';
};
}