MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / isDocker

Function isDocker

packages/cli/src/telemetry/agent_runtime.ts:271–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269}
270
271function 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'

Callers 1

detectSandboxRuntimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected