Merge pull request #40947 from samueldr/fix/34779

dockerTools: fixes extraCommands for mkRootLayer.
This commit is contained in:
lewo
2018-05-24 21:22:31 +02:00
committed by GitHub
3 changed files with 22 additions and 2 deletions
+4 -2
View File
@@ -352,7 +352,9 @@ rec {
extraCommands ? ""
}:
# Generate an executable script from the `runAsRoot` text.
let runAsRootScript = shellScript "run-as-root.sh" runAsRoot;
let
runAsRootScript = shellScript "run-as-root.sh" runAsRoot;
extraCommandsScript = shellScript "extra-commands.sh" extraCommands;
in runWithOverlay {
name = "docker-layer-${name}";
@@ -390,7 +392,7 @@ rec {
'';
postUmount = ''
(cd layer; eval "${extraCommands}")
(cd layer; ${extraCommandsScript})
echo "Packing layer..."
mkdir $out