is-inside-container
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

is-inside-container

Check if the process is running inside a container

Install

npm install is-inside-container

Usage

import isInsideContainer from 'is-inside-container';

if (isInsideContainer()) {
	console.log('Running inside a container');
}

CLI

is-inside-container

Exits with code 0 if inside a container and 2 if not.

Supported containers

  • Docker
  • Podman

Related

  • is-docker - Check if the process is running inside a Docker container

Package Sidebar

Install

npm i is-inside-container

Weekly Downloads

4,919,489

Version

1.0.0

License

MIT

Unpacked Size

3.48 kB

Total Files

6

Last publish

Collaborators

  • sindresorhus