mirror of https://github.com/docker/docs.git
Merge branch 'master' of github.com:kitematic/kitematic
This commit is contained in:
commit
9a3ee1e363
|
@ -148,6 +148,7 @@
|
|||
}
|
||||
min-height: @dashboard-content-height;
|
||||
max-height: @dashboard-content-height;
|
||||
overflow-x: hidden;
|
||||
overflow-y: overlay;
|
||||
}
|
||||
.nav-tabs > li,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var watchers = {};
|
||||
|
||||
removeBindFolder = function (name, callback) {
|
||||
exec(path.join(getBinDir(), 'boot2docker') + ' ssh "rm -rf /var/lib/docker/binds/' + name + '"', function(err, stdout) {
|
||||
exec(path.join(getBinDir(), 'boot2docker') + ' ssh "sudo rm -rf /var/lib/docker/binds/' + name + '"', function(err, stdout) {
|
||||
callback(err, stdout);
|
||||
});
|
||||
};
|
||||
|
@ -104,7 +104,7 @@ recoverApps = function (callback) {
|
|||
}
|
||||
var container = docker.getContainer(app.docker.Id);
|
||||
container.inspect(function (err, data) {
|
||||
if (app.status !== 'STARTING' && !data.State.Running) {
|
||||
if (app.status !== 'STARTING' && data && data.State && !data.State.Running) {
|
||||
console.log('restarting: ' + app.name);
|
||||
console.log(app.docker.Id);
|
||||
Fiber(function () {
|
||||
|
@ -181,8 +181,15 @@ Meteor.methods({
|
|||
var image = Images.findOne(appObj.imageId);
|
||||
loadKiteVolumes(image.path, appObj.name);
|
||||
var app = Apps.findOne(appId);
|
||||
Meteor.call('runApp', app, function (err) {
|
||||
if (err) { throw err; }
|
||||
removeBindFolder(app.name, function (err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
}
|
||||
Fiber(function () {
|
||||
Meteor.call('runApp', app, function (err) {
|
||||
if (err) { throw err; }
|
||||
});
|
||||
}).run();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -128,7 +128,7 @@ var getFromImage = function (dockerfile) {
|
|||
var regex = new RegExp(patternString, "g");
|
||||
var fromInstruction = dockerfile.match(regex);
|
||||
if (fromInstruction && fromInstruction.length > 0) {
|
||||
return fromInstruction[0].split(' ')[1].trim();
|
||||
return fromInstruction[0].replace('FROM', '').trim();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -199,12 +199,14 @@ createTarFileSync = function (image) {
|
|||
|
||||
var convertVolumeObjToArray = function (obj) {
|
||||
var result = [];
|
||||
_.each(_.keys(obj), function (key) {
|
||||
var volumeObj = {};
|
||||
volumeObj.Path = key;
|
||||
volumeObj.Value = obj[key];
|
||||
result.push(volumeObj);
|
||||
});
|
||||
if (obj !== null && typeof obj === 'object') {
|
||||
_.each(_.keys(obj), function (key) {
|
||||
var volumeObj = {};
|
||||
volumeObj.Path = key;
|
||||
volumeObj.Value = obj[key];
|
||||
result.push(volumeObj);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue