Innovenergy_trunk/frontend/node_modules/is-podman
Kim 085d7c68ba adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
..
LICENSE adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
README.md adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
cli.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
index.d.ts adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
index.js adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00
package.json adding untracked frontend and typescript files 2023-02-21 07:27:20 +01:00

README.md

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.

Install

$ npm install is-podman

Code Usage

import isPodman = require('is-podman')

if (isPodman()) {
	console.log('Running inside a Podman container')
}

CLI Usage

$ is-podman

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
  2. Docker
  3. Podman

Behavior was as expected, but no formal tests have been written yet.