Philipp Partosch 46a936d7de added all files to project | 2 years ago | |
---|---|---|
.. | ||
cli.js | 2 years ago | |
index.d.ts | 2 years ago | |
index.js | 2 years ago | |
license | 2 years ago | |
package.json | 2 years ago | |
readme.md | 2 years ago |
Check if the process is running inside a Docker container
$ npm install is-docker
const isDocker = require('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.