You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/is-docker
侯晓宇 0cb2601919
init
4 weeks ago
..
cli.js init 4 weeks ago
index.d.ts init 4 weeks ago
index.js init 4 weeks ago
license init 4 weeks ago
package.json init 4 weeks ago
readme.md init 4 weeks ago

readme.md

is-docker

Check if the process is running inside a Docker container

Install

$ npm install is-docker

Usage

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.