1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-23 00:03:05 +00:00

Fixed: Detect Docker when using control group v2

This commit is contained in:
Bogdan 2023-08-07 18:40:23 +03:00
parent 7ae82a982c
commit 35d3923947

View file

@ -77,7 +77,9 @@ public OsInfo(IEnumerable<IOsVersionAdapter> versionAdapters, Logger logger)
FullName = Name; 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; IsDocker = true;
} }