codeql-action/node_modules/is-docker
Henry Mercer 0a11e3fdd9 Bump packages to fix linter 2023-01-18 21:00:07 +00:00
..
cli.js Bump packages to fix linter 2023-01-18 21:00:07 +00:00
index.d.ts Bump packages to fix linter 2023-01-18 21:00:07 +00:00
index.js Bump packages to fix linter 2023-01-18 21:00:07 +00:00
license Bump packages to fix linter 2023-01-18 21:00:07 +00:00
package.json Bump packages to fix linter 2023-01-18 21:00:07 +00:00
readme.md Bump packages to fix linter 2023-01-18 21:00:07 +00: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.