This commit makes Docker throw an error if the daemon isn't started as root. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
@@ -97,6 +97,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