metaforecast/node_modules/is-docker
2021-03-07 20:27:07 +01:00
..
cli.js Initial commit 2021-01-12 13:43:41 +01:00
index.d.ts Initial commit 2021-01-12 13:43:41 +01:00
index.js Initial commit 2021-01-12 13:43:41 +01:00
license Initial commit 2021-01-12 13:43:41 +01:00
package.json Daily commit 2021-03-07 20:27:07 +01:00
readme.md Initial commit 2021-01-12 13:43:41 +01:00

is-docker Build Status

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.