Socket
Book a DemoInstallSign in
Socket

docker-events

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-events

Create an event emitter from dockerode's events response

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

docker-events

Create an event emitter from dockerode's events response

Overview

Docker exposes an event API, allowing one to monitor the happenings of a Docker host. dockerode allows for consumption of this API, albeit in a very raw form. docker-events does a bit of work for you, turning the raw API of dockerode into something a little more high-level by parsing the response stream and pushing things out of an EventEmitter.

API

DockerEvents (constructor)

var emitter = new DockerEvents({
  docker: new Dockerode(options),
});

start

emitter.start();

stop

emitter.stop();

#connect

emitter.on("connect", function() {
  console.log("connected to docker api");
});

#disconnect

emitter.on("disconnect", function() {
  console.log("disconnected to docker api; reconnecting");
});

#_message

emitter.on("_message", function(message) {
  console.log("got a message from docker: %j", message);
});

#create

emitter.on("create", function(message) {
  console.log("container created: %j", message);
});

#start

emitter.on("start", function(message) {
  console.log("container started: %j", message);
});

#stop

emitter.on("stop", function(message) {
  console.log("container stopped: %j", message);
});

#die

emitter.on("die", function(message) {
  console.log("container died: %j", message);
});

#destroy

emitter.on("destroy", function(message) {
  console.log("container destroyed: %j", message);
});

License

3-clause BSD. A copy is included with the source.

Contact

  • GitHub (deoxxa)
  • Twitter (@deoxxa)
  • Email (deoxxa@fknsrs.biz)

Keywords

docker

FAQs

Package last updated on 27 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.