Fixed: Detect Docker when using control group v2

pull/8954/head
Bogdan 1 year ago
parent caea810908
commit 145f67d14b

@ -77,7 +77,9 @@ namespace NzbDrone.Common.EnvironmentInfo
FullName = Name; FullName = Name;
} }
if (IsLinux && File.Exists("/proc/1/cgroup") && File.ReadAllText("/proc/1/cgroup").Contains("/docker/")) if (IsLinux &&
((File.Exists("/proc/1/cgroup") && File.ReadAllText("/proc/1/cgroup").Contains("/docker/")) ||
(File.Exists("/proc/1/mountinfo") && File.ReadAllText("/proc/1/mountinfo").Contains("/docker/"))))
{ {
IsDocker = true; IsDocker = true;
} }

Loading…
Cancel
Save