title: Use socks5 proxy from host for docker build
body: <p>To build a certain image I need to create a tunnel and make docker use this tunnel as a socks5 proxy (to use the proxy for DNS too).</p>
  
  <p>So now i've got several problems:</p>
  
  <ol>
  <li>How to make docker use the proxy that is on the host?</li>
  <li>How to make docker use the proxy to get the base image?</li>
  <li>How to make docker use the proxy for the RUN instruction?</li>
  <li>How to make docker use the proxy for the ADD instruction?</li>
  </ol>