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