2.0.1 • Published 9 years ago

docker-remote-api-as-promised v2.0.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
9 years ago

Circle CI

NPM

docker-remote-api as promised

This is a promise-enabled wrapper for docker-remote-api.

The API purports to be the same, just returning a promise for each transaction. Being though that a promise is returned, you must supply the body for a transaction via the options object. There is also no ability to get back the response stream from Docker currently &emdash; you will receive the response as the argument to resolving the promise.

Installation

npm install --save docker-remote-api-as-promised

Usage

var draap = require('docker-remote-api-as-promised');
var docker = draap('/var/run/docker.sock');

docker
  .post('/images/create?fromImage=busybox', {body: null})
  .then(function(response) {
    // do something with busybox
  })
  .catch(function(err) {
    //return an error!
  });

License

Apache 2.0; Copyright 2015 Scripto