From 64716a2de5a309dbf70ed20215c7e7f6c53ea69d Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 1 Dec 2015 00:39:54 -0800 Subject: [PATCH] cloudron exec: disable links for subcontainers Dec 01 08:36:53 girish.cloudron.us node[5431]: Error: HTTP code is 409 which indicates error: undefined - Conflicting options: --net=container can't be used with links. This would result in undefined behavior --- src/docker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docker.js b/src/docker.js index 4f8c3544f..2bda4f90d 100644 --- a/src/docker.js +++ b/src/docker.js @@ -184,7 +184,6 @@ function createSubcontainer(app, name, cmd, options, callback) { PortBindings: isAppContainer ? dockerPortBindings : { }, PublishAllPorts: false, ReadonlyRootfs: semver.gte(targetBoxVersion(app.manifest), '0.0.66'), // see also Volumes in startContainer - Links: addons.getLinksSync(app, app.manifest.addons), RestartPolicy: { "Name": isAppContainer ? "always" : "no", "MaximumRetryCount": 0 @@ -192,6 +191,7 @@ function createSubcontainer(app, name, cmd, options, callback) { CpuShares: 512, // relative to 1024 for system processes VolumesFrom: isAppContainer ? null : [ app.containerId + ":rw" ], NetworkMode: isAppContainer ? 'default' : ('container:' + app.containerId), // share network namespace with parent + Links: isAppContainer ? addons.getLinksSync(app, app.manifest.addons) : null, // links is redundant with --net=container SecurityOpt: config.CLOUDRON ? [ "apparmor:docker-cloudron-app" ] : null // profile available only on cloudron } };