dockerode-bluebird
v1.0.4
Published
dockerode bluebird from https://github.com/apocas/dockerode/pull/108
Downloads
23
Readme
dockerode-bluebird
See https://github.com/apocas/dockerode/pull/108.
Node.js
npm install dockerode-bluebird
Then:
var Docker = require("dockerode-bluebird");
Usage
var docker = new Docker({socketPath: '/var/run/docker.sock'});
var data = {
Image: 'mesoscloud/zookeeper:3.4.6-ubuntu-14.04',
//Cmd: [],
'ExposedPorts': {
'2181/tcp': {}
},
name: 'zookeeper',
HostConfig: {
PortBindings: {
"2181/tcp": [
{
"HostPort": "2181"
}
]
}
}
};
docker.createContainerAsync(data).then( function(container) {
console.log('startZookeeper container = ' + container);
return container.startAsync();
}).catch(function(error) {
console.log('startZookeeper error = ' + error);
}).finally( function() {
console.log('startZookeeper finally ');
});