mirror of https://github.com/docker/docs.git
Fixed crash when restarting app.
This commit is contained in:
parent
5038b2e5e8
commit
06c4afec93
|
@ -136,7 +136,11 @@ var getFromImage = function (dockerfile) {
|
||||||
|
|
||||||
restartApp = function (app, callback) {
|
restartApp = function (app, callback) {
|
||||||
if (app.docker && app.docker.Id) {
|
if (app.docker && app.docker.Id) {
|
||||||
restartContainerSync(app.docker.Id);
|
try {
|
||||||
|
restartContainerSync(app.docker.Id);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
var containerData = getContainerDataSync(app.docker.Id);
|
var containerData = getContainerDataSync(app.docker.Id);
|
||||||
Fiber(function () {
|
Fiber(function () {
|
||||||
Apps.update(app._id, {$set: {
|
Apps.update(app._id, {$set: {
|
||||||
|
@ -145,7 +149,6 @@ restartApp = function (app, callback) {
|
||||||
}});
|
}});
|
||||||
}).run();
|
}).run();
|
||||||
callback(null);
|
callback(null);
|
||||||
|
|
||||||
// Use dig to refresh the DNS
|
// Use dig to refresh the DNS
|
||||||
exec('/usr/bin/dig dig ' + app.name + '.dev @172.17.42.1 ', function(err, out) {
|
exec('/usr/bin/dig dig ' + app.name + '.dev @172.17.42.1 ', function(err, out) {
|
||||||
console.log(out);
|
console.log(out);
|
||||||
|
|
Loading…
Reference in New Issue