Force developers not to run build-docker-image as root
Instead recommend developer run build within the docker group. This script is non-functional as the root user. Change-Id: Ib70ab55e5e9bc2e7b8639d5d5ffc32a2b8795058
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/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)
|
TOPDIR=$(git rev-parse --show-toplevel)
|
||||||
IMGDIR="$(cd "$(dirname "$0")" && pwd)"
|
IMGDIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user