id

is-docker

Check if the process is running inside a Docker container

Showing:

Popularity

Downloads/wk

15.8M

GitHub Stars

159

Maintenance

Last Commit

2mos ago

Contributors

6

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

is-docker

Check if the process is running inside a Docker container

Install

$ npm install is-docker

Usage

import isDocker from '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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial