Give containers a name
This commit is contained in:
@@ -117,8 +117,9 @@ function downloadImage(manifest, callback) {
|
||||
}, callback);
|
||||
}
|
||||
|
||||
function createSubcontainer(app, cmd, callback) {
|
||||
function createSubcontainer(app, name, cmd, callback) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
assert.strictEqual(typeof name, 'string');
|
||||
assert(!cmd || util.isArray(cmd));
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
@@ -159,6 +160,7 @@ function createSubcontainer(app, cmd, callback) {
|
||||
var containerOptions = {
|
||||
// do _not_ set hostname to app fqdn. doing so sets up the dns name to look up the internal docker ip. this makes curl from within container fail
|
||||
Hostname: semver.gte(targetBoxVersion(app.manifest), '0.0.77') ? app.location : config.appFqdn(app.location),
|
||||
Name: name, // used for filtering logs
|
||||
Tty: isAppContainer,
|
||||
Image: app.manifest.dockerImage,
|
||||
Cmd: cmd,
|
||||
@@ -201,7 +203,7 @@ function createSubcontainer(app, cmd, callback) {
|
||||
}
|
||||
|
||||
function createContainer(app, callback) {
|
||||
createSubcontainer(app, null, callback);
|
||||
createSubcontainer(app, app.id /* name */, null /* cmd */, callback);
|
||||
}
|
||||
|
||||
function startContainer(containerId, callback) {
|
||||
|
||||
Reference in New Issue
Block a user