is-docker

WebJar for is-docker

License

License

MIT
Categories

Categories

Docker Container Virtualization Tools
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

is-docker
Last Version

Last Version

2.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

is-docker
WebJar for is-docker
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/is-docker

Download is-docker

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/is-docker/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>is-docker</artifactId>
    <version>2.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/is-docker/
implementation 'org.webjars.npm:is-docker:2.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/is-docker/
implementation ("org.webjars.npm:is-docker:2.1.1")
'org.webjars.npm:is-docker:jar:2.1.1'
<dependency org="org.webjars.npm" name="is-docker" rev="2.1.1">
  <artifact name="is-docker" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='is-docker', version='2.1.1')
)
libraryDependencies += "org.webjars.npm" % "is-docker" % "2.1.1"
[org.webjars.npm/is-docker "2.1.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

is-docker

Check if the process is running inside a Docker container

Install

$ npm install is-docker

Usage

const isDocker = require('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.

Versions

Version
2.1.1