mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #5496 from unclejack/check_if_root
check if the daemon is run as root on startup
This commit is contained in:
@@ -98,6 +98,10 @@ func main() {
|
||||
}
|
||||
|
||||
if *flDaemon {
|
||||
if os.Geteuid() != 0 {
|
||||
log.Fatalf("The Docker daemon needs to be run as root")
|
||||
}
|
||||
|
||||
if flag.NArg() != 0 {
|
||||
flag.Usage()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user