is-docker
Advanced tools
Weekly downloads
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.
FAQs
Check if the process is running inside a Docker container
The npm package is-docker receives a total of 21,399,772 weekly downloads. As such, is-docker popularity was classified as popular.
We found that is-docker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.