# is-inside-container

> Check if the process is running inside a container (Docker/Podman)

Latest version **1.0.0** (published 2023-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-inside-container
pnpm add is-inside-container
yarn add is-inside-container
bun add is-inside-container
```

Provides the command `is-inside-container`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-02-15 |
| First published | 2023-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=14.16 |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 74 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | detect, inside, container, docker, dockerized, podman, is, env, environment, process |

## Links

- npm: https://www.npmjs.com/package/is-inside-container
- Repository: https://github.com/sindresorhus/is-inside-container
- Homepage: https://github.com/sindresorhus/is-inside-container#readme
- Issues: https://github.com/sindresorhus/is-inside-container/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-inside-container

## Dependencies (1)

- [is-docker](https://npm.io/package/is-docker.md) ^3.0.0

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-02-15

## README

# 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

---
_Source: https://npm.io/package/is-inside-container · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
