()
| 269 | } |
| 270 | |
| 271 | function isDocker(): boolean { |
| 272 | if (existsSync("/.dockerenv")) return true; |
| 273 | if (platform() !== "linux") return false; |
| 274 | try { |
| 275 | const cgroup = readFileSync("/proc/1/cgroup", "utf-8"); |
| 276 | return cgroup.includes("docker") || cgroup.includes("containerd"); |
| 277 | } catch { |
| 278 | return false; |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | /** |
| 283 | * AWS Firecracker microVMs expose /dev/vsock and report sys_vendor='Amazon EC2' |
no outgoing calls
no test coverage detected