is-inside-container
Check if the process is running inside a container (Docker/Podman)
Last updated 2 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-inside-container 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (4)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |