From 8fa771e7d4ddb7db16c630d3d28f51d85428bfbc Mon Sep 17 00:00:00 2001 From: jjqq Date: Sun, 11 Jun 2017 17:06:21 +0900 Subject: [PATCH] fix error when docker DAEMON is running with user namespace enabled. 1:mkdir: can't create directory '/var/run/scope/': Permission denied --- scope | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scope b/scope index 475cea060..03a7ee350 100755 --- a/scope +++ b/scope @@ -165,7 +165,8 @@ create_plugins_dir() { # is not shared from OS X and does not belong to the system." # In any case, creating /var/run/scope/plugins on Mac OS would not work, as domain # sockets do not cross VM boundaries. We need this directory to exits on the VM. - docker run --rm --entrypoint=/bin/sh \ + # shellcheck disable=SC2086 + docker run $USERNS_HOST --rm --entrypoint=/bin/sh \ -v /var/run:/var/run \ "$SCOPE_IMAGE" -c "mkdir -p /var/run/scope/plugins" }