mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
streamLayeredImage: Change mode of /nix, /nix/store to 755
The change is insignificant when the owner is root. However, when it is not root, this change is needed to allow using Nix (as an unprivileged user) inside the container.
This commit is contained in:
parent
0ec13cdb90
commit
2697d34603
|
@ -181,7 +181,7 @@ in {
|
|||
):
|
||||
docker.succeed(
|
||||
"docker load --input='${examples.bashLayeredWithUser}'",
|
||||
"docker run -u somebody --rm ${examples.bashLayeredWithUser.imageName} ${pkgs.bash}/bin/bash -c 'test 555 == $(stat --format=%a /nix) && test 555 == $(stat --format=%a /nix/store)'",
|
||||
"docker run -u somebody --rm ${examples.bashLayeredWithUser.imageName} ${pkgs.bash}/bin/bash -c 'test 755 == $(stat --format=%a /nix) && test 755 == $(stat --format=%a /nix/store)'",
|
||||
"docker rmi ${examples.bashLayeredWithUser.imageName}",
|
||||
)
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ def archive_paths_to(obj, paths, mtime, uid, gid, uname, gname):
|
|||
return ti
|
||||
|
||||
def nix_root(ti):
|
||||
ti.mode = 0o0555 # r-xr-xr-x
|
||||
ti.mode = 0o0755 # rwxr-xr-x
|
||||
return ti
|
||||
|
||||
def dir(path):
|
||||
|
|
Loading…
Reference in a new issue