Do not set Hostname for subcontainers

This commit is contained in:
Girish Ramakrishnan
2015-11-26 19:26:25 -08:00
parent 32f677ca0d
commit df8653cdd5

View File

@@ -161,7 +161,8 @@ function createSubcontainer(app, name, cmd, options, callback) {
var containerOptions = {
name: name, // used for filtering logs
// 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),
// for subcontainers, this should not be set because we already share the network namespace with app container
Hostname: isAppContainer ? (semver.gte(targetBoxVersion(app.manifest), '0.0.77') ? app.location : config.appFqdn(app.location)) : null,
Tty: isAppContainer,
Image: app.manifest.dockerImage,
Cmd: cmd,