setup-kubectl/node_modules/is-docker
github-actions[bot] 7f7e5ba5ea
Add node modules and compiled JavaScript from main (#57)
Co-authored-by: Oliver King <oking3@uncc.edu>
2022-06-21 12:18:30 -04:00
..
cli.js Add node modules and compiled JavaScript from main (#57) 2022-06-21 12:18:30 -04:00
index.d.ts Add node modules and compiled JavaScript from main (#57) 2022-06-21 12:18:30 -04:00
index.js Add node modules and compiled JavaScript from main (#57) 2022-06-21 12:18:30 -04:00
license Add node modules and compiled JavaScript from main (#57) 2022-06-21 12:18:30 -04:00
package.json Add node modules and compiled JavaScript from main (#57) 2022-06-21 12:18:30 -04:00
readme.md Add node modules and compiled JavaScript from main (#57) 2022-06-21 12:18:30 -04: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.