is-docker
Advanced tools
Check if the process is running inside a Docker container
Weekly downloads
Changelog
https://github.com/sindresorhus/is-docker/compare/v2.2.1...v3.0.0
Readme
Check if the process is running inside a Docker container
$ npm install is-docker
import isDocker from 'is-docker';
if (isDocker()) {
console.log('Running inside a Docker container');
}
$ is-docker
Exits with code 0 if inside a Docker container and 2 if not.
Check if the process is running inside a Docker container
The npm package is-docker receives a total of 17,614,272 weekly downloads. As such, is-docker popularity was classified as popular.
We found that is-docker demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.