Projects
View on GitHub
sindresorhus/is-docker
About
Check whether the process is running inside a Docker container.
Systems & InfrastructureMeasured star growth
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +2
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalis-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.
$ is-docker && echo "Running in Docker" || echo "Not running in Docker"
Related
- is-inside-container - Check if the process is running inside a container
Explore related projects
Loading…