# @useparagon/is-docker

> Check if the process is running inside a Docker container

Latest version **3.0.1** (published 2022-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @useparagon/is-docker
pnpm add @useparagon/is-docker
yarn add @useparagon/is-docker
bun add @useparagon/is-docker
```

Provides the command `is-docker`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2022-03-04 |
| First published | 2022-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sindre Sorhus |
| Maintainers | useparagon |
| Keywords | detect, docker, dockerized, container, inside, is, env, environment, process |

## Links

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

## 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

- 3.0.1 (latest) — 2022-03-04

## README

# is-docker

> Check if the process is running inside a Docker container

## Install

```
$ npm install is-docker
```

## Usage

```js
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.

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