Description
IsContainerized returns false when executed in a container using cgroupns as /proc/1/cgroup
is just 0::/
due to cgroup namespacing in the container.
Please consider also checking for /sys/fs/cgroup/cgroup.type
in these cases. See for example the container detection in systemd, https://github.com/systemd/systemd/blob/main/src/basic/virt.c#L593.