Skip to content

Commit

Permalink
Merge pull request #131 from foliea/get-exec
Browse files Browse the repository at this point in the history
Add method to get exec instance
  • Loading branch information
apocas committed Apr 18, 2015
2 parents f6bc227 + bb12c1b commit 8e2f87b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var EventEmitter = require('events').EventEmitter,
Modem = require('docker-modem'),
Container = require('./container'),
Image = require('./image'),
Exec = require('./exec'),
util = require('./util'),
extend = util.extend;

Expand Down Expand Up @@ -164,6 +165,14 @@ Docker.prototype.getImage = function(name) {
return new Image(this.modem, name);
};

/**
* Fetches an Exec instance by ID
* @param {String} id Exec instance's ID
*/
Docker.prototype.getExec = function(id) {
return new Exec(this.modem, id);
};

/**
* Lists containers
* @param {Options} opts Options (optional)
Expand Down

0 comments on commit 8e2f87b

Please sign in to comment.