Docker Community Forums

Share and learn in the Docker community.

Adding options for fd fails to start docker daemon


(Abhatnagar) #1

I am trying to add option to /etc/default/docker on ubuntu 14.04. When I add option -H fd://* , daemon fails to start with no clear log message in the log file. My DOCKER_OPTS file is like below -

DOCKER_OPTS="
-H unix:///var/run/docker.sock
-H tcp://0.0.0.0:2375
-H fd://*"
What is wrong in above syntax or some additional info need to be provided ?
Docker version is 1.7.0, build 0baf609

Thanks
Ajay


(Sabin Basyal) #2

Hi Ajay,

Why do you want to use -H fd://* with Ubuntu 14.04? AFAIK, it is merely intended on Systemd based systems, where you can communicate with the daemon via Systemd socket activation and Ubuntu 14.04 by default use Upstart.

Did you change 14.04 LTS to use to systemd, instead of upstart? If not, you can just remove that -H fd://* option and restart your docker daemon.

If you want to see the logs, you can remove that -H fd://* from /etc/default/docker and try
sudo docker -d -D -H fd://*. Then you would see more information.

Regards,
Sabin


(Abhatnagar) #3

Hi Sabin,

Actually I am trying launch docker container with Marathon. Since I am using Weaveproxy/Weave-dns, it requires an environment variable DOCKER_HOST=tcp://127.0.0.1:12375 be set before starting the container so that it can ensure weave-proxy is ready before container is started. I could not find any clear method to pass to Marathon this environment variable. Putting this variable in env directive of json file also did not help. So I was trying to find a workaround by comparing a similar running container without Marathon. Idea is to tell anything like Marathon to talk to weaveproxy instead of direct to Docker, and it sets up the weave network and does all the necessary things. I did not see in the document if it is a systemd feature only. Would appreciate if you could let me know, how to set the DOCKER_HOST for Marathon (if it is possible) or how to make marathon to talk to weaveproxy instead of Docker when starting a Docker container from Marathon.

Thanks
Ajay