Kargi-Sitesi/node_modules/is-docker
2024-11-03 21:30:09 -05:00
..
cli.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
index.d.ts Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
index.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
license Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
package.json Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
readme.md Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00

is-docker

Check if the process is running inside a Docker container

Install

$ npm install is-docker

Usage

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.