Bakhtina Sofya b84cb877be 1st comm | 2 settimane fa | |
---|---|---|
.. | ||
cli.js | 2 settimane fa | |
index.d.ts | 2 settimane fa | |
index.js | 2 settimane fa | |
license | 2 settimane fa | |
package.json | 2 settimane fa | |
readme.md | 2 settimane fa |
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.