# docker-allcontainers

> Get notified when a new container is started or stopped

Latest version **0.8.0** (published 2017-11-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install docker-allcontainers
pnpm add docker-allcontainers
yarn add docker-allcontainers
bun add docker-allcontainers
```

Provides the command `docker-allcontainers`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.0 |
| Published | 2017-11-13 |
| First published | 2015-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Matteo Collina |
| Maintainers | matteo.collina |
| Keywords | docker, container, event, notify |

## Links

- npm: https://www.npmjs.com/package/docker-allcontainers
- Repository: https://github.com/mcollina/docker-allcontainers
- Issues: https://github.com/mcollina/docker-allcontainers/issues
- npm.io page: https://npm.io/package/docker-allcontainers

## Dependencies (5)

- [split2](https://npm.io/package/split2.md) ^2.1.1
- [through2](https://npm.io/package/through2.md) ^2.0.3
- [dockerode](https://npm.io/package/dockerode.md) ^2.4.3
- [fast-json-parse](https://npm.io/package/fast-json-parse.md) ^1.0.2
- [never-ending-stream](https://npm.io/package/never-ending-stream.md) ^2.0.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.8.0 (latest) — 2017-11-13
- 0.7.0 — 2017-06-01
- 0.6.1 — 2016-09-01
- 0.6.0 — 2016-08-25
- 0.5.0 — 2016-06-20
- 0.4.0 — 2015-06-08
- 0.3.1 — 2015-05-06
- 0.3.0 — 2015-05-05
- 0.2.1 — 2015-04-27
- 0.2.0 — 2015-02-16
- 0.1.2 — 2015-02-04
- 0.1.1 — 2015-02-04
- 0.1.0 — 2015-02-04

## README

# docker-allcontainers

Get notified when a new container is started or stopped

## Install

```bash
npm install docker-allcontainers --save
```

## Usage

```js
var allContainer = require('docker-allcontainers')
var ee = allContainers({
  preheat: true, // emit starts event for all already running containers
  docker: null, // options to Dockerode
  matchByName: /hello/, // optional
  matchByImage: /matteocollina/, //optional
  skipByName: /.*pasteur.*/, //optional
  skipByImage: /.*dockerfile.*/ //optional
})
ee.on('start', function(meta, container) {
  // container is a Dockerode Container
  // see Dockerode API
  console.log('started', meta)
})
ee.on('stop', function(meta, container) {
  // container is a Dockerode Container
  // see Dockerode API
  console.log('stopped', meta)
})

// stop after 5 secs
setTimeout(function() {
  ee.destroy()
}, 5000)
```

## License

MIT

---
_Source: https://npm.io/package/docker-allcontainers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
