diff --git a/src/docker.js b/src/docker.js index 01bb0e183..4f8c3544f 100644 --- a/src/docker.js +++ b/src/docker.js @@ -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,