title: Error response from daemon: getsockopt: connection refused
body: <p>When I try to pull an image from a private Docker Registry I get the error </p>
  
  <pre><code>Error response from daemon: Get https://XX.XX.XX.XXX:5000/v1/_ping: dial tcp XX.XX.XX.XXX:5000: getsockopt: connection refused
  </code></pre>
  
  <p>The docker registry is definitely listening on the correct port. Running</p>
  
  <pre><code>ss --listen --tcp -n -p
  </code></pre>
  
  <p>Gives the result </p>
  
  <pre><code>State       Recv-Q Send-Q                                           Local Address:Port                                             Peer Address:Port
  LISTEN      0      128                                                          *:22                                                          *:*
  LISTEN      0      128                                                         :::22                                                         :::*
  LISTEN      0      128                                                         :::5000                                                       :::*
  </code></pre>
  
  <p>Does anyone have any suggestions for how to solve this problem? I'm really stumped by it! </p>
  
  <p>Thanks in advance! </p>