brew.sh: allow Docker to run as root.

This commit is contained in:
Mike McQuaid 2019-02-14 10:47:07 +00:00
parent 058bd4bf7c
commit 31dd2ee856
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -350,6 +350,9 @@ 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
# Homebrew Services may need `sudo` for system-wide daemons.
[[ "$HOMEBREW_COMMAND" = "services" ]] && return