Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-docker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-docker - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

5

index.js

@@ -17,6 +17,3 @@ 'use strict';

try {
const cGroup = fs.readFileSync('/proc/self/cgroup', 'utf8');
return cGroup.includes('docker') ||
cGroup.split('\n').some(line => line.length > 0 && !line.endsWith('/') && !line.endsWith('init.scope'));
return fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
} catch (_) {

@@ -23,0 +20,0 @@ return false;

2

package.json
{
"name": "is-docker",
"version": "2.2.0",
"version": "2.2.1",
"description": "Check if the process is running inside a Docker container",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc