Innovenergy_trunk/frontend/node_modules/is-docker
Kim 085d7c68ba adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
..
cli.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
index.d.ts adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
index.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
license adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
package.json adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
readme.md adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00

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.