Skip to content

scriptoLLC/docker-remote-api-as-promised

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A promise-wrapped version of docker-remote-api

Resources

License

Stars

Watchers

Forks

Packages

No packages published