New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-podman

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-podman - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

2

cli.js

@@ -5,2 +5,2 @@ #!/usr/bin/env node

process.exitCode = isPodman() ? 0 : 2
process.exitCode = isPodman() ? 0 : 2

@@ -6,6 +6,6 @@ /**

```
import isPodman = require('is-podman);
import isPodman = require('is-podman)
if (isPodman()) {
console.log('Running inside a Podman container');
console.log('Running inside a Podman container')
}

@@ -12,0 +12,0 @@ ```

@@ -5,3 +5,3 @@ 'use strict'

/**
* Checks for the presence of `/run/.containerenv`, which is present within Podman containers, but within Docker containers
* Checks for the presence of `/run/.containerenv`, which is present within Podman containers, but not within Docker containers (which have `/.dockerenv` instead)
* @returns {boolean}

@@ -22,2 +22,2 @@ */

module.exports = isPodman
module.exports = isPodman
{
"name": "is-podman",
"version": "0.1.0",
"version": "1.0.0",
"description": "Check if the process is running inside a Podman container",

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

# is-podman
`is-podman` is an NPM module that checks whether a process is running inside a Podman container. This module is intended to work similarly to sindresorhus' `is-docker` [module](https://www.npmjs.com/package/is-docker)
`is-podman` is an NPM module that checks whether a process is running inside a Podman container. This module is intended to work similarly to sindresorhus' `is-docker [module](https://www.npmjs.com/package/is-docker).

@@ -11,17 +11,25 @@ ## Install

## Usage
## Code Usage
```js
import isPodman = require('is-podman);
import isPodman = require('is-podman')
if (isPodman()) {
console.log('Running inside a Podman container');
console.log('Running inside a Podman container')
}
```
## CLI
## CLI Usage
```
$ is-podman
```
Exits with code 0 if inside a Podman container and 2 if not.
Exits with code 0 if inside a Podman container and 2 if not.
## Testing
Both the code and CLI functionality were tested on WSL in the following environemtnts:
1. no containerization
1. Docker
1. Podman
Behavior was as expected, but no formal tests have been written yet.
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