Duplicate of #171
As recommended in #171, https://www.npmjs.com/package/dockerode-promise
Got it. I think this can be noted somewhere. Thanks anyway!
Just pushed to the repo a promise based interface, check it out :)
@apocas Great work! Thank you!
Em... In some cases, I prefer another promise library instead of the native one, e.g. bluebird. Could you enable users to plug in their favourite promise library?
I think that can be achieved like this:
Users pass their promise library to Docker:
const docker = new Docker({
socketPath: '...',
Promise: require('bluebird')
})
then the constructer can save it in the Modem instance
Docker() {
...
this.modem.Promise = opts.Promise || global.Promise
...
}
After that, just replace return new Promise() with return new this.modem.Promise().
Humm, interesting :)
Yes this is a good idea.
Done :)
Thanks for the feedback!
@apocas Great! I can't wait for its publication to NPM!
Most helpful comment
Done :)
Thanks for the feedback!