mirror of https://github.com/docker/docs.git
Invert CgroupDevicesEnabled condition
It feels better to test where it's required than listing everywhere it is not required. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
75109b32db
commit
72fefc0441
|
|
@ -550,8 +550,8 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot
|
||||||
|
|
||||||
sysInfo := sysinfo.New(false)
|
sysInfo := sysinfo.New(false)
|
||||||
// Check if Devices cgroup is mounted, it is hard requirement for container security,
|
// Check if Devices cgroup is mounted, it is hard requirement for container security,
|
||||||
// on Linux/FreeBSD.
|
// on Linux.
|
||||||
if runtime.GOOS != "windows" && runtime.GOOS != "solaris" && !sysInfo.CgroupDevicesEnabled {
|
if runtime.GOOS == "linux" && !sysInfo.CgroupDevicesEnabled {
|
||||||
return nil, fmt.Errorf("Devices cgroup isn't mounted")
|
return nil, fmt.Errorf("Devices cgroup isn't mounted")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue