I have changed /etc/default/docker with DOCKER_OPTS=\"-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock\" (docker version 1.4.1 in ubuntu 14.0
After checking docker source code (config.go and flags.go), I would say that the options you can pass in $DOCKER_OPTS are options for docker itself, and -H or --host is an option for docker daemon.
As a workaround to solve your problem, you can edit the init script file you are using to include the -H option there. For example:
/etc/init/docker.conf changing the exec line with exec "$DOCKER" -H "tcp://127.0.0.1:2375" -H "unix:///var/run/docker.sock" -d $DOCKER_OPTS/etc/init.d/docker changing the starting lines with something like:Use this command:
start-stop-daemon --start --background \
--no-close \
--exec "$DOCKER" \
--pidfile "$DOCKER_SSD_PIDFILE" \
--make-pidfile \
-- \
-H "tcp://127.0.0.1:2375" \
-H "unix:///var/run/docker.sock" \
-d -p "$DOCKER_PIDFILE" \
$DOCKER_OPTS >> \
"$DOCKER_LOGFILE" 2>&1
log_end_msg $?
;;