Skip to content
Check if the process is running inside a Docker container
Branch: master
Clone or download
Latest commit 018db88 Oct 27, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes init Apr 8, 2015
.gitignore
.travis.yml
index.js fix: check /.dockerenv or cgroup setup (#3) Oct 27, 2016
license init Apr 8, 2015
package.json
readme.md meta tweaks May 18, 2016
test.js fix: check /.dockerenv or cgroup setup (#3) Oct 27, 2016

readme.md

is-docker Build Status

Check if the process is running inside a Docker container

Install

$ npm install --save is-docker

Usage

const isDocker = require('is-docker');

if (isDocker()) {
	console.log('Running inside a Docker container');
}

License

MIT © Sindre Sorhus

You can’t perform that action at this time.