From c09905199a1a867c9cc56125895e2402b3578e80 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Tue, 12 Jul 2016 14:08:55 +0100 Subject: [PATCH] init: don't start docker on 0.0.0.0:2375 on DfM/DfW Signed-off-by: Rolf Neugebauer --- alpine/packages/docker/etc/init.d/docker | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/alpine/packages/docker/etc/init.d/docker b/alpine/packages/docker/etc/init.d/docker index a1f43538f..1636846c8 100755 --- a/alpine/packages/docker/etc/init.d/docker +++ b/alpine/packages/docker/etc/init.d/docker @@ -13,9 +13,13 @@ start() pidfile="/run/docker.pid" - # Start with networking on both Mac and Hyper-V, but in - # future change this to use a hypervisor socket. - DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock" + # Only start with networking on cloud editions + DOCKER_OPTS="${DOCKER_OPTS} -H unix:///var/run/docker.sock" + if [ ! -z $(bootflag cloud_provider) ] + then + # TODO: More elegant way to turn on "debug mode" + DOCKER_OPTS="${DOCKER_OPTS} -H 0.0.0.0:2375" + fi # some config is always in /etc/docker cannot specify alternative eg certs if mobyconfig exists etc/docker