|
@@ -761,6 +761,12 @@ func NewDaemon(config *daemonconfig.Config, eng *engine.Engine) (*Daemon, error)
|
|
|
}
|
|
|
|
|
|
func NewDaemonFromDirectory(config *daemonconfig.Config, eng *engine.Engine) (*Daemon, error) {
|
|
|
+ if runtime.GOOS != "linux" {
|
|
|
+ log.Fatalf("The Docker daemon is only supported on linux")
|
|
|
+ }
|
|
|
+ if os.Geteuid() != 0 {
|
|
|
+ log.Fatalf("The Docker daemon needs to be run as root")
|
|
|
+ }
|
|
|
if !config.EnableSelinuxSupport {
|
|
|
selinuxSetDisabled()
|
|
|
}
|