From ce820f6f73682270f34b2b264ade7c6b657438e7 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 9 Aug 2023 10:48:37 +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 bbc8581ef..251d4879a 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; }