diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index 96b64cbc..e54debc2 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -20,6 +20,11 @@ case "${1}" in esac } +if [ "$(whoami)" != "root" ] || [ "$(id -u)" != "0" ] || [ "$(id -g)" != "0" ]; then + print_red "Container does not run as root. Cannot continue." + exit 1 +fi + # Check if socket is available and readable if ! [ -a "/var/run/docker.sock" ]; then print_red "Docker socket is not available. Cannot continue."