title: Set Docker_Opts in centos
body: <p>I need to set docker to listen to tcp://0.0.0.0/4243 on my host machine running amazon linux (centos). All the documentation I have seen has told me to run the following command</p>
  
  <pre><code>echo DOCKER_OPTS="-H=tcp://127.0.0.1:4243" &gt;&gt; /etc/default/docker
  </code></pre>
  
  <p>Which will write the correct docker_opts to /etc/default/docker. I've done this, but when I restart docker it does not listen to 127.0.0.1</p>
  
  <p>I can make docker run correctly by typing </p>
  
  <pre><code>sudo /usr/bin/docker -H tcp://0.0.0.0:4243 -d &amp;
  </code></pre>
  
  <p>That works, but I want the default option to be listening on tcp://0.0.0.0:4243 without having to specify it every time. </p>
  
  <p>It seems that docker is completely ignoring my /etc/default/docker file so the settings are being ignored. I also tried writing the file to /etc/default/docker.io and /etc/default/docker-io (didn't really expect much to happen)</p>
  
  <p>I need to be able to start docker with just </p>
  
  <pre><code>service docker start
  </code></pre>
  
  <p>or it will cause issues in my current deployment playbook.</p>
  
  <p>Any thoughts on what I can do to set DOCKER_OPTS and not have to do it every time I restart docker?</p>