Socket
Book a DemoInstallSign in
Socket

docker-events2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-events2

Listen to docker events

1.0.0
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

docker-events2

Listen to docker events

Usage

var events = require('docker-events')()

events.on('service:create', function onServiceCreate (event) {
  console.log('service created')
})
events.on('service:remove', function onServiceRemove (event) {
  console.log('service removed')
})
events.on('*', function onAny (event) {
  console.log('something happened')
})

API

emitter = DockerEvents([opts])

Returns an EventEmitter. Event names are composed out of event type (container, service, ..) and action (create, update, remove, ..): Type:Action.

api docs

emiterr.start([cb(err, stream)])

Starts listening for events emitted by the docker engine.

emiterr.stop()

Stops listening for events emitted by the docker engine.

emitter.on(eventName, listener(data))

Listen to an event. If the event name is * all events are catched.

Installation

npm i docker-events2

License

MIT

Keywords

docker

FAQs

Package last updated on 27 Sep 2017

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.