@cogs/is-docker
v0.2.0
Published
Check if the process is running inside a Docker container
Readme
@cogs/is-docker
Check if the process is running inside a Docker container.
Usage
import { isDocker } from "@cogs/is-docker";
if (isDocker()) {
// running inside a Docker container
}The result is detected once (checking for /.dockerenv, /proc/self/cgroup,
and /proc/self/mountinfo) and cached for the lifetime of the process.
