Skip to content
Permalink
9bfb9ba527
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
github-actions[bot] Update checked-in dependencies
Latest commit 40a500c Jul 13, 2023 History
0 contributors

Users who have contributed to this file

36 lines (23 sloc) 547 Bytes
# is-inside-container
> Check if the process is running inside a container
## Install
```sh
npm install is-inside-container
```
## Usage
```js
import isInsideContainer from 'is-inside-container';
if (isInsideContainer()) {
console.log('Running inside a container');
}
```
## CLI
```sh
is-inside-container
```
Exits with code 0 if inside a container and 2 if not.
## Supported containers
- Docker
- Podman
## Related
- [is-docker](https://github.com/sindresorhus/is-docker) - Check if the process is running inside a Docker container