Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kkweon/is-docker-running

NPM module to check if a docker container is running
https://github.com/kkweon/is-docker-running

Last synced: 24 days ago
JSON representation

NPM module to check if a docker container is running

Awesome Lists containing this project

README

        

# is-docker-running
[![Build Status](https://travis-ci.org/kkweon/is-docker-running.svg?branch=master)](https://travis-ci.org/kkweon/is-docker-running)

A simple library to check if a docker container is running by the name

## Installation

```bash
npm install is-docker-running
```

```bash
yarn add is-docker-running
```

## Usage

### commonjs

```js
const isDockerRunning = require("is-docker-running");
isDockerRunning.findContainerByName("db"); // returns Promise
```

### CLI

```bash
find-docker-by-name ps # ps is not running
```

You can check multiples

```bash
find-docker-by-name db webapp
# db is running
# webapp is not running
```