title: docker login behind proxy on private registry gives TLS handshake timeout
body: <p>We have a private docker registry at work (based on portus, but whatever) and I try to push an image to this registry but it doesn't work. It fails with the following error message:</p>
  
  <pre><code>$ sudo docker login archive.docker-registry.mycompany.com
  Username: mylogin
  Password: 
  Error response from daemon: Get https://archive.docker-registry.mycompany.com/v1/users/:
      net/http: TLS handshake timeout
  $ 
  </code></pre>
  
  <p>I already configured the proxy in /etc/systemd/system/docker.service.d/http-proxy.conf (my docker is on centos 7):</p>
  
  <pre><code>[Service]
  Environment="HTTP_PROXY=http://proxy.mycompany.com:8000/" "NO_PROXY=localhost,127.0.0.1,archive.docker-registry.mycompany.com"
  </code></pre>
  
  <p>but it still fails.</p>
  
  <p>I tried to use HTTPS_PROXY instead of HTTP_PROXY using either http or https in url, I tried to download certificate manually and configure them in system (update-ca-certs) but it keeps failing.</p>
  
  <p>When I changed this configuration file, as root, I executed:</p>
  
  <pre><code># systemctl daemon-reload
  # systemctl restart docker
  </code></pre>