From 145f67d14b5eaa72316331bc3c511dca70d995fc Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 9 Aug 2023 10:47:48 +0300 Subject: [PATCH] Fixed: Detect Docker when using control group v2 --- src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs index 23b3ab885..f016b08bb 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs @@ -77,7 +77,9 @@ namespace NzbDrone.Common.EnvironmentInfo 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; }