mirror of
https://github.com/docker/docs.git
synced 2026-11-05 00:14:17 +03:00
Fixed starting/stopping apps locking up issue.
This commit is contained in:
@@ -53,17 +53,20 @@ AppUtil.start = function (appId) {
|
||||
Apps.update(app._id, {$set: {
|
||||
status: 'STARTING'
|
||||
}});
|
||||
Docker.getContainerData(app.docker.Id, function (err, data) {
|
||||
Docker.startContainer(app.docker.Id, function (err) {
|
||||
if (err) { console.error(err); }
|
||||
// Use dig to refresh the DNS
|
||||
exec('/usr/bin/dig ' + app.name + '.kite @172.17.42.1', function(err, stdout, stderr) {
|
||||
console.log(err);
|
||||
console.log(stdout);
|
||||
console.log(stderr);
|
||||
Apps.update(app._id, {$set: {
|
||||
status: 'READY',
|
||||
docker: data
|
||||
}});
|
||||
Docker.getContainerData(app.docker.Id, function (err, data) {
|
||||
if (err) { console.error(err); }
|
||||
// Use dig to refresh the DNS
|
||||
exec('/usr/bin/dig ' + app.name + '.kite @172.17.42.1', function(err, stdout, stderr) {
|
||||
console.log(err);
|
||||
console.log(stdout);
|
||||
console.log(stderr);
|
||||
Apps.update(app._id, {$set: {
|
||||
status: 'READY',
|
||||
docker: data
|
||||
}});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ Docker.runContainer = function (app, image, callback) {
|
||||
|
||||
Docker.startContainer = function (containerId, callback) {
|
||||
var container = docker.getContainer(containerId);
|
||||
container.stop(function (err) {
|
||||
container.start(function (err) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
callback(err);
|
||||
|
||||
Reference in New Issue
Block a user