# is-docker [](https://travis-ci.com/github/sindresorhus/is-docker) > Check if the process is running inside a Docker container ## Install ``` $ npm install is-docker ``` ## Usage ```js const isDocker = require('is-docker'); if (isDocker()) { console.log('Running inside a Docker container'); } ``` ## CLI ``` $ is-docker ``` Exits with code 0 if inside a Docker container and 2 if not.
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
cli.js | File | 105 B | 0755 |
|
index.d.ts | File | 254 B | 0644 |
|
index.js | File | 449 B | 0644 |
|
license | File | 1.09 KB | 0644 |
|
package.json | File | 3.52 KB | 0644 |
|
readme.md | File | 476 B | 0644 |
|