Merge pull request #6186 from maxwellb/patch-1

Handle userns security
This commit is contained in:
Joffrey F 2018-09-12 17:04:37 -07:00 committed by GitHub
commit 17d4845dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -55,4 +55,9 @@ else
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
fi
# Handle userns security
if [ ! -z "$(docker info 2>/dev/null | grep userns)" ]; then
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS --userns=host"
fi
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"