Merge pull request #5913 from MikeMcQuaid/docker-root-debug

Debug Docker root issues
This commit is contained in:
Mike McQuaid 2019-03-23 13:05:47 +00:00 committed by GitHub
commit aa485f86ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -355,8 +355,8 @@ fi
check-run-command-as-root() {
[[ "$(id -u)" = 0 ]] || return
# Allow Docker to do everything as root (as it's normal there)
[[ -f /proc/1/cgroup ]] && grep docker -q /proc/1/cgroup && return
# Allow Azure Pipelines/Docker to do everything as root (as it's normal there)
[[ -f /proc/1/cgroup ]] && grep -E "azpl_job|docker" -q /proc/1/cgroup && return
# Homebrew Services may need `sudo` for system-wide daemons.
[[ "$HOMEBREW_COMMAND" = "services" ]] && return