Merge pull request #2176 from weaveworks/2175-initialize-userns

Initialize USERNS_HOST variable
This commit is contained in:
Alfonso Acosta
2017-02-01 16:26:36 +01:00
committed by GitHub

1
scope
View File

@@ -27,6 +27,7 @@ WEAVESCOPE_DOCKER_ARGS=${WEAVESCOPE_DOCKER_ARGS:-}
# "Cannot share the host's network namespace when user namespaces are enabled" for `docker run --net=host`
# To avoid above errors, use `--userns=host` option to let container use host User Namespace.
# This option(saved in $USERNS_HOST) will be inserted ONLY IF docker support `--userns` option.
USERNS_HOST=""
docker run --help | grep -q -- --userns && USERNS_HOST="--userns=host"
usage() {