mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05: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:
commit
5f301191cf
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue