mirror of https://github.com/docker/docs.git
Fixing random containers created
This commit is contained in:
parent
553b0773c8
commit
eaaf813ac1
|
@ -179,7 +179,7 @@ AppUtil.sync = function (callback) {
|
|||
return app.status === 'STARTING' && app.name === appName;
|
||||
});
|
||||
|
||||
if (startingApp || _.isEmpty(container.NetworkSettings.Ports)) {
|
||||
if (startingApp || _.isEmpty(container.NetworkSettings.Ports) || !_.pairs(container.NetworkSettings.Ports)[0][1]) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,8 +109,6 @@ Docker.runContainer = function (app, image, callback) {
|
|||
containerOpts.ExposedPorts = app.docker.NetworkSettings.Ports;
|
||||
}
|
||||
|
||||
console.log(containerOpts);
|
||||
|
||||
Docker.client().createContainer(containerOpts, function (err, container) {
|
||||
if (err) { callback(err, null); return; }
|
||||
console.log('Created container: ' + container.id);
|
||||
|
@ -135,7 +133,6 @@ Docker.runContainer = function (app, image, callback) {
|
|||
startOpts.PublishAllPorts = true;
|
||||
}
|
||||
|
||||
console.log(startOpts);
|
||||
container.start(startOpts, function (err) {
|
||||
if (err) { callback(err, null); return; }
|
||||
console.log('Started container: ' + container.id);
|
||||
|
|
|
@ -61,7 +61,7 @@ Metrics.prepareUUID = function (callback) {
|
|||
callback();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Metrics.prepareTracking = function (callback) {
|
||||
db = level(Util.getMetricsDir());
|
||||
|
|
|
@ -225,7 +225,7 @@ updateBoot2DockerUtilization = function (callback) {
|
|||
|
||||
startUpdatingBoot2DockerUtilization = function () {
|
||||
updateBoot2DockerUtilization(function (err) { if (err) {console.log(err);} });
|
||||
Meteor.setTimeout(startUpdatingBoot2DockerUtilization, 2000);
|
||||
Meteor.setTimeout(startUpdatingBoot2DockerUtilization, 8000);
|
||||
};
|
||||
|
||||
startSyncingAppState = function () {
|
||||
|
@ -239,5 +239,5 @@ startSyncingAppState = function () {
|
|||
}
|
||||
});
|
||||
});
|
||||
Meteor.setTimeout(startSyncingAppState, 2000);
|
||||
Meteor.setTimeout(startSyncingAppState, 8000);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue