Merge pull request #116749 from vroad/docker-layered-image-fakeroot

dockerTools.streamLayeredImage: add fakeRootCommands option
This commit is contained in:
Robert Hensing
2021-04-07 15:02:24 +02:00
committed by GitHub
4 changed files with 41 additions and 7 deletions
+13
View File
@@ -484,4 +484,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
'';
};
}