Irina Glushko 2389e7160b HW1 done | %!s(int64=3) %!d(string=hai) anos | |
---|---|---|
.. | ||
cli.js | %!s(int64=3) %!d(string=hai) anos | |
index.d.ts | %!s(int64=3) %!d(string=hai) anos | |
index.js | %!s(int64=3) %!d(string=hai) anos | |
license | %!s(int64=3) %!d(string=hai) anos | |
package.json | %!s(int64=3) %!d(string=hai) anos | |
readme.md | %!s(int64=3) %!d(string=hai) anos |
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.