mecano
Version:
Common functions for system deployment.
33 lines (29 loc) • 729 B
JavaScript
// Generated by CoffeeScript 1.11.1
var docker, util;
module.exports = function(options, callback) {
var cmd, k, ref, v;
options.log({
message: "Entering Docker wait",
level: 'DEBUG',
module: 'mecano/lib/docker/wait'
});
if (options.docker == null) {
options.docker = {};
}
ref = options.docker;
for (k in ref) {
v = ref[k];
if (options[k] == null) {
options[k] = v;
}
}
if (options.container == null) {
return callback(Error('Missing container parameter'));
}
cmd = "wait " + options.container + " | read r; return $r";
return this.execute({
cmd: docker.wrap(options, cmd)
}, docker.callback);
};
docker = require('../misc/docker');
util = require('util');