3.0.1 • Published 1 year ago

volante-docker v3.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
1 year ago

Volante Docker Spoke

Volante Spoke module which uses docker.sock to expose the Docker Engine HTTP API to other Volante Spokes.

Usage

npm install volante-docker

Volante modules are automatically loaded and instanced if they are installed locally and hub.attachAll() is called.

Options

Options may be changed using the volante-docker.options event with an options object (shown with defaults):

hub.emit('VolanteDocker.update', {
  sock: '/var/run/docker.sock' // default
});

Example

hub.on('any.reply.event.name', (d) => console.log(d));

hub.emit('VolanteDocker.command', {
  eventName: 'any.reply.event.name',
  method: 'GET',
  path: '/containers/json'
});

volante-docker attempts to automatically fill in the API version number for the Docker Engine at /var/docker.sock, so this would be sent as /v1.31/containers/json to a Docker Engine implementing the v1.31 API.

Events

Handled

  • VolanteDocker.props
    {
      sock: String
    }
  • VolanteDocker.command
    {
      eventName: String, // optional
      method: String,
      path: String,
      parameters: Object, // optional
      body: Object // optional
    }

Emitted

In addition to native Volante log events, this modules also emits the response to a Docker Engine HTTP API request using the eventName given in the VolanteDocker.command. If no eventName was provided, the response will not be emitted.

License

ISC

3.0.1

1 year ago

3.0.0

1 year ago

2.0.0

5 years ago

1.0.2

7 years ago

1.0.1

7 years ago