Docker image create very slow under proxy network
<p>I'm using Docker 1.12.3 and I'm trying to create an image on top of Node + Yarn. When I run <code>yarn install</code> it takes around 5 seconds to install when there is a <code>yarn.lock</code> file present. I'm inside a corporate network with proxy configured. At home is even faster than 5 seconds.</p>

<p>On the other hand, when I run this command:</p>

<pre><code>docker build -t alansouzati/testing . --build-arg HTTPS_PROXY=http://PROXY:PORT
</code></pre>

<p>The yarn install hangs in there forever. If I enter an existing image and try <code>yarn install</code> inside the container it works perfectly.</p>

<p>So this leads me to believe this is nothing wrong with my proxy configuration but with the Docker build creation process. I have tried to use <code>network=host</code> in the build command but it did not help.</p>

<p>Any recommendation on how to improve the Docker image creation when inside a proxied network?</p>