Set container hostname to something constant

currently, it defaults to the container name. apps might use this hostname
for communication with child containers. but this breaks if app gets updated
and gets a new hostname
This commit is contained in:
Girish Ramakrishnan
2018-11-02 14:46:00 -07:00
parent 0618431be7
commit 7739f8f174

View File

@@ -218,6 +218,7 @@ function createSubcontainer(app, name, cmd, options, callback) {
var containerOptions = {
name: name, // used for filtering logs
Tty: isAppContainer,
Hostname: app.id, // set to something 'constant' so app containers can use this to communicate (across app updates)
Image: app.manifest.dockerImage,
Cmd: (isAppContainer && app.debugMode && app.debugMode.cmd) ? app.debugMode.cmd : cmd,
Env: stdEnv.concat(addonEnv).concat(portEnv).concat(appEnv),