From 3b12392d49094626d1804ed304d672cc9fdbebdf Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 14 Aug 2023 23:46:03 +0300 Subject: [PATCH] Fixed: Replace docker detection for cgroup v2 --- src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs index b9f560b51..f37b40fec 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs @@ -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; }