https://github.com/scriptollc/docker-remote-api-as-promised
A promise-wrapped version of docker-remote-api
https://github.com/scriptollc/docker-remote-api-as-promised
Last synced: about 1 year ago
JSON representation
A promise-wrapped version of docker-remote-api
- Host: GitHub
- URL: https://github.com/scriptollc/docker-remote-api-as-promised
- Owner: scriptoLLC
- License: other
- Created: 2015-05-27T11:55:54.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T15:22:07.000Z (almost 9 years ago)
- Last Synced: 2025-03-04T08:02:34.165Z (over 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/scriptoLLC/docker-remote-api-as-promised)
[](https://npmjs.org/package/docker-remote-api-as-promised/)
# docker-remote-api as promised
This is a promise-enabled wrapper for [docker-remote-api](https://github.com/mafintosh/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
```js
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