Merge pull request #2519 from nextcloud/mastercontainer-root-check

add root user check for mastercontainer
This commit is contained in:
Simon L 2023-05-11 10:06:12 +02:00 committed by GitHub
commit c25587bcc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,12 @@ case "${1}" in
esac
}
# Check if running as root user
if [ "$EUID" != "0" ]; then
print_red "Container does not run as root user. This is not supported."
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."