0.0.2 • Published 8 years ago

dkr v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

dkr

dkr is a library to provide Docker command line API for Node.js

Dependencies

This library depends on docker command line tool.
You need to install docker on your machine to use the library.

Installation

npm install -S dkr

Usage

ps

var dkr = require('dkr');

dkr.ps()
  .then(function(containers) {
    console.log(containers);
  })
  .catch(function(e) {
    console.error(e);
  });

run

var dkr = require('dkr');

dkr.run('node:5.7.0', {
    detach: true,
    port: '8888:8888',
    name: 'my-node',
    command: '',
    args: [
    ]
  })
  .then(function(containerId) {
    console.log(containerId);
  })
  .catch(function(e) {
    console.error(e);
  });

rm

var dkr = require('dkr');

dkr.rm(containerId, {
    force: true
  })
  then(function(containerId) {
    console.log(containerId);
  })
  .catch(function(e) {
    console.error(e);
  });
0.0.2

8 years ago

0.0.1

8 years ago