Replace docker detection for cgroup v2

pull/5936/head
Bogdan 10 months ago committed by GitHub
parent d493f8762f
commit 78d4dee461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save