public static function inContainer(): bool
    {
        if (file_exists(self::CGROUP_FILE)
            && ($content = file_get_contents(self::CGROUP_FILE))
            && preg_match(self::CGROUP_PATTERN, $content)) {
            return true;
        }
        return false;
    }
public static function inContainer(): bool
    {
        if (file_exists(self::CGROUP_FILE)
            && ($content = file_get_contents(self::CGROUP_FILE))
            && preg_match(self::CGROUP_PATTERN, $content)) {
            return true;
        }
        return false;
    }
public static function inContainer ( ) : bool { if ( file_exists ( self :: CGROUP_FILE ) && ( $ content = file_get_contents ( self :: CGROUP_FILE ) ) && preg_match ( self :: CGROUP_PATTERN , $ content ) ) { return true ; } return false ; }
Determine if run in container

@return bool

@codeCoverageIgnore

@link https://stackoverflow.com/a/20012536
Determine if run in container