title: Docker hub keeps timing out and retrying on large image layer until failure
body: <p>I have an unavoidably large docker image layer (2.4GB). When I push the image to my paid docker hub registry account (support is non-existent on this issue), it pushes at about 1MB per second, and about half way through times out and starts re-trying. It does this about 5 times before giving up.</p>
  
  <p>I used to be able to push the layer--I think perhaps I am at some threshold where, depending on the docker upload speed, sometimes I timeout and sometimes I don't. It seems like an old problem <a href="https://github.com/docker/distribution/issues/469" rel="nofollow noreferrer">https://github.com/docker/distribution/issues/469</a> but solution is inconclusive.</p>
  
  <p>Here's what times out:</p>
  
  <pre><code>docker push metalaureate/yard-stats:latest
  The push refers to repository [docker.io/metalaureate/yard-stats]
  68aa0af45ea8: Preparing 
  68aa0af45ea8: Pushing [==&gt;                                                ]  137.7MB/2.492GB
  c8902f34de3c: Layer already exists 
  239c6e8c7ca5: Layer already exists 
  c1c31e2fe28c: Pushed 
  88176e364a30: Pushing [==========&gt;                                        ]  203.9MB/970.9MB
  981eff82d876: Layer already exists 
  c11aa0d1cbc2: Layer already exists 
  8bc59dd7b32b: Layer already exists 
  de9ab7da6a52: Layer already exists 
  86cf19f333cc: Layer already exists 
  4b8e4d51fbe2: Layer already exists 
  cf5b3c6798f7: Layer already exists 
  </code></pre>
  
  <p>My Dockerfile looks like this:</p>
  
  <pre><code>FROM andrejreznik/python-gdal:stable
  
  RUN apt-get update -y &amp;&amp; apt-get install -y libsm6 libxext6 libxrender-dev &amp;&amp; apt-get install -y curl  nginx
  
  
  WORKDIR /
  COPY ./ /
  COPY nginx.conf /etc/nginx
  RUN pip install -r ./requirements.txt
  
  
  CMD ["./start.sh"]
  </code></pre>
  
  <p>EDIT:
  I tried encapsulate the 2.4GB layer in a separate image and derive my yard-stats image from that, on the theory that docker wouldn’t try to push up the image that it was deriving from, but that didn’t help.</p>