diff --git a/tools/build-docker-image b/tools/build-docker-image index da819dde31..06e95a326c 100755 --- a/tools/build-docker-image +++ b/tools/build-docker-image @@ -1,5 +1,10 @@ #!/bin/bash +if [[ $EUID -eq 0 ]]; then + echo "This script must not be run as root. Instead add yourself to the docker group." 1>&2 + exit 1 +fi + TOPDIR=$(git rev-parse --show-toplevel) IMGDIR="$(cd "$(dirname "$0")" && pwd)"