Add conditional services based on mobyplatform

Replaces https://github.com/docker/moby/pull/282

Use mobyplatform=xxx to specify platform in boot command

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2016-07-18 12:20:37 +01:00
parent e115aebeaa
commit 3d3b67d0c3
10 changed files with 57 additions and 31 deletions

View File

@@ -15,9 +15,9 @@ start()
# Only start with networking on cloud editions
DOCKER_OPTS="${DOCKER_OPTS} -H unix:///var/run/docker.sock"
if [ ! -z $(bootflag cloud_provider) ]
if [ "$(mobyplatform)" == "aws" ] || [ "$(mobyplatform)" == "azure" ]
then
# TODO: More elegant way to turn on "debug mode"
# TODO: Don't do this
DOCKER_OPTS="${DOCKER_OPTS} -H 0.0.0.0:2375"
fi