title: cannot access Docker remote registry
body: <p>I am using docker from a Ubuntu VM. I set up an unsecure registry using the steps mentioned in this <a href="https://docs.docker.com/registry/insecure/" rel="nofollow noreferrer">link</a>. I can push &amp; pull images from the registry in the host machine but I cannot access the registry from another machine in the same network.</p>
  <p>I have done the following -</p>
  <ol>
  <li><p>Edited the <code>/etc/default/docker</code> and edited the DOCKER_OPTS as follows -</p>
  <p><code>DOCKER_OPTS=&quot;--insecure-registry cmrepo.com:5000&quot;</code></p>
  </li>
  <li><p>Restarted the VM .</p>
  </li>
  <li><p>Started the registry as follows -</p>
  <p><code>docker run -d -p 5000:5000 --name registry registry:2</code></p>
  </li>
  </ol>
  <p>Everything works as expected till this point . I can pull/push images into the registry.</p>
  <p>Now how do I access the registry from another machine . I tried adding an <code>ip-host entry (10.216.20.14  cmrepo.com)</code> in the <code>/etc/hosts</code> file but it din't help. I can ping 10.216.20.14 from the remote machine but cannot access the registry.</p>
  <p>Can someone point out what is it that I am doing wrong or need to do more?</p>