Replace docker detection for cgroup v2

(cherry picked from commit 78d4dee4610c5f3f90cc69469004008aa64900b8)
pull/1825/head
Bogdan 1 year ago
parent aeb3b7d8b5
commit e024bba6b6

@ -78,8 +78,8 @@ namespace NzbDrone.Common.EnvironmentInfo
}
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/"))))
(File.Exists("/.dockerenv") ||
(File.Exists("/proc/1/cgroup") && File.ReadAllText("/proc/1/cgroup").Contains("/docker/"))))
{
IsDocker = true;
}

Loading…
Cancel
Save