From 83fbc0f0359f6885d5c3b22fb5331f459ade7329 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 1 Jul 2017 16:59:15 +0200 Subject: [PATCH] docker-tools: fixup permssions for extraCommands --- pkgs/build-support/docker/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 004816a0b392..592dcd3cae7b 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -252,6 +252,8 @@ rec { echo "No contents to add to layer." fi + chmod ug+w layer + if [[ -n $extraCommands ]]; then (cd layer; eval "$extraCommands") fi @@ -296,7 +298,7 @@ rec { # How much disk to allocate for the temporary virtual machine. diskSize ? 1024, # Commands (bash) to run on the layer; these do not require sudo. - extraCommands ? "", uid ? 0, gid ? 0 + extraCommands ? "" }: # Generate an executable script from the `runAsRoot` text. let runAsRootScript = shellScript "run-as-root.sh" runAsRoot; @@ -311,6 +313,8 @@ rec { echo "Adding $item..." rsync -ak --chown=0:0 $item/ layer/ done + + chmod ug+w layer ''; postMount = ''