Bakhtina Sofya b84cb877be 1st comm 2 週間 前
..
cli.js b84cb877be 1st comm 2 週間 前
index.d.ts b84cb877be 1st comm 2 週間 前
index.js b84cb877be 1st comm 2 週間 前
license b84cb877be 1st comm 2 週間 前
package.json b84cb877be 1st comm 2 週間 前
readme.md b84cb877be 1st comm 2 週間 前

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.