https://github.com/quobject/dockerode-bluebird
dockerode bluebird from https://github.com/d6u/Dockership/blob/master/lib/promisified/docker-promisified.js
https://github.com/quobject/dockerode-bluebird
Last synced: 9 months ago
JSON representation
dockerode bluebird from https://github.com/d6u/Dockership/blob/master/lib/promisified/docker-promisified.js
- Host: GitHub
- URL: https://github.com/quobject/dockerode-bluebird
- Owner: Quobject
- License: mit
- Created: 2015-09-03T20:23:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-14T18:45:14.000Z (over 10 years ago)
- Last Synced: 2025-07-06T16:01:49.008Z (9 months ago)
- Language: JavaScript
- Size: 164 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dockerode-bluebird
[](https://nodei.co/npm/dockerode-bluebird/)
[](https://nodei.co/npm/dockerode-bluebird/)
See [https://github.com/apocas/dockerode/pull/108](https://github.com/apocas/dockerode/pull/108).
## Node.js
npm install dockerode-bluebird
Then:
```js
var Docker = require("dockerode-bluebird");
```
## Usage
```js
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 ');
});
```