mirror of https://github.com/docker/docs.git
Renamed image rebuild functions.
This commit is contained in:
parent
4ddcc92b9e
commit
9ff6af34d5
|
@ -32,7 +32,7 @@ AppUtil.restartHelper = function (app) {
|
||||||
docker: data
|
docker: data
|
||||||
}});
|
}});
|
||||||
// Use dig to refresh the DNS
|
// Use dig to refresh the DNS
|
||||||
// exec('/usr/bin/dig dig ' + app.name + '.kite @172.17.42.1 ', function() {});
|
exec('/usr/bin/dig dig ' + app.name + '.kite @172.17.42.1', function() {});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ Docker.runContainer = function (app, image, callback) {
|
||||||
if (err) { callback(err, null); return; }
|
if (err) { callback(err, null); return; }
|
||||||
console.log('Started container: ' + container.id);
|
console.log('Started container: ' + container.id);
|
||||||
// Use dig to refresh the DNS
|
// Use dig to refresh the DNS
|
||||||
exec('/usr/bin/dig dig ' + app.name + '.kite @172.17.42.1 ', function() {});
|
exec('/usr/bin/dig dig ' + app.name + '.kite @172.17.42.1', function() {});
|
||||||
callback(null, container);
|
callback(null, container);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -56,7 +56,7 @@ ImageUtil.saveFolder = function (directory, imageId, callback) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ImageUtil.rebuild = function (image, callback) {
|
ImageUtil.rebuildHelper = function (image, callback) {
|
||||||
Util.deleteFolder(image.path);
|
Util.deleteFolder(image.path);
|
||||||
var imageMetaData = ImageUtil.getMetaData(image.originPath);
|
var imageMetaData = ImageUtil.getMetaData(image.originPath);
|
||||||
if (imageMetaData.logo) {
|
if (imageMetaData.logo) {
|
||||||
|
@ -91,7 +91,7 @@ ImageUtil.rebuild = function (image, callback) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ImageUtil.rebuildImage = function (imageId) {
|
ImageUtil.rebuild = function (imageId) {
|
||||||
var image = Images.findOne(imageId);
|
var image = Images.findOne(imageId);
|
||||||
if (!image) {
|
if (!image) {
|
||||||
throw new Meteor.Error(403, "No image found with this ID.");
|
throw new Meteor.Error(403, "No image found with this ID.");
|
||||||
|
@ -113,7 +113,7 @@ ImageUtil.rebuildImage = function (imageId) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
ImageUtil.rebuild(image, function (err) {
|
ImageUtil.rebuildHelper(image, function (err) {
|
||||||
if (err) { console.error(err); }
|
if (err) { console.error(err); }
|
||||||
});
|
});
|
||||||
_.each(apps, function (app) {
|
_.each(apps, function (app) {
|
||||||
|
@ -123,7 +123,7 @@ ImageUtil.rebuildImage = function (imageId) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ImageUtil.rebuild(image, function (err) {
|
ImageUtil.rebuildHelper(image, function (err) {
|
||||||
if (err) { console.error(err); }
|
if (err) { console.error(err); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ Template.dashboard_single_image.events({
|
||||||
},
|
},
|
||||||
'click .btn-rebuild': function () {
|
'click .btn-rebuild': function () {
|
||||||
$('.btn-icon').tooltip('hide');
|
$('.btn-icon').tooltip('hide');
|
||||||
ImageUtil.rebuildImage(this._id, function (err) {
|
ImageUtil.rebuild(this._id, function (err) {
|
||||||
if (err) { console.error(err); }
|
if (err) { console.error(err); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ Template.dashboard_images_layout.events({
|
||||||
},
|
},
|
||||||
'click .btn-rebuild': function () {
|
'click .btn-rebuild': function () {
|
||||||
$('.header .icons a').tooltip('hide');
|
$('.header .icons a').tooltip('hide');
|
||||||
ImageUtil.rebuildImage(this._id, function (err) {
|
ImageUtil.rebuild(this._id, function (err) {
|
||||||
if (err) { console.error(err); }
|
if (err) { console.error(err); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue