mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-03-04 01:38:41 +08:00
Merge pull request #2519 from nextcloud/mastercontainer-root-check
add root user check for mastercontainer
This commit is contained in:
commit
c25587bcc3
1 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,12 @@ case "${1}" in
|
||||||
esac
|
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
|
# Check if socket is available and readable
|
||||||
if ! [ -a "/var/run/docker.sock" ]; then
|
if ! [ -a "/var/run/docker.sock" ]; then
|
||||||
print_red "Docker socket is not available. Cannot continue."
|
print_red "Docker socket is not available. Cannot continue."
|
||||||
|
|
Loading…
Reference in a new issue