1.0.0 • Published 7 years ago

dockode v1.0.0

Weekly downloads
2
License
Apache2
Repository
github
Last release
7 years ago

Dockerode Promise

Effectively all dockerode async operations which use callbacks should now use a promise... Its important that dockerode is a peerDependency as dockerode promise will not include one of its own.

Usage

var Docker = require('dockode');

var docker = new Docker({ ... });

docker.run('ubuntu', ['/bin/bash', '-c', 'echo "xx"']).then(
  function (output) {
    // output.result
    // output.container
  }
);

Specify Promise library:

var Docker = require('dockode');
var Promise = require('bluebird');

var docker = new Docker({
    ...
    promiseLibrary: Promise
});