Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 15, 2024 via pnpm

is-docker 3.0.0

Check if the process is running inside a Docker container
Package summary
Share
0
issues
1
license
1
MIT
Package created
8 Apr 2015
Version published
31 Aug 2021
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
is-docker@3.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of is-docker 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does is-docker do?

'is-docker' is a highly useful npm package that allows developers to check if a certain process is running within a Docker container. This package is particularly useful when you want to modify your application's behavior based on the environment it's in.

How do you use is-docker?

To use 'is-docker', first, install it in your project using npm with the command npm install is-docker. Here is an example on how to use 'is-docker' in your JavaScript code:

import isDocker from 'is-docker';

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

In this code, isDocker() is a function that returns a boolean value based on whether the application is running inside a Docker container or not.

'is-docker' also provides a CLI command. After it's installed globally or in your project, you can type is-docker in your terminal. If the shell process is inside a Docker container, the program exits with code 0. Otherwise, it exits with code 2.

Where are the is-docker docs?

The official documentation for 'is-docker' is available directly in its README on its GitHub repository, which can be found at https://github.com/sindresorhus/is-docker. Here you'll find all the necessary instructions and details on how to use this package.