From 328459af0b32c3e8b89c0b85813c1f8a68e768f8 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 18 Aug 2023 07:58:34 +0300 Subject: [PATCH] Replace docker detection for cgroup v2 (cherry picked from commit 78d4dee4610c5f3f90cc69469004008aa64900b8) --- 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 251d4879a..7fd525b13 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; }