<p>I'm writing as I've encountered an issue that doesn't seem to get resolved, would value the community's help.</p>
<p>I'm trying to push an image to a local registry I deployed on port 5000.</p>
<p>When I use this command <code>docker push localhost:5000/explorecalifornia.com</code> to push the image to my local registry, I get the following message</p>
<pre><code>Get &quot;http://localhost:5000/v2/&quot;: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
</code></pre>
<p>I've confirmed the registry is on port 5000 by using GET on postman, and I get a valid, expected <code>{}</code> response (since there's no images currently on my local registry).</p>
<p>I've since tried to fix this by updating my <code>etc/hosts</code> file to comment out &quot;::1 localhost&quot; per advise of this <a href="https://stackoverflow.com/questions/57570423/net-http-request-canceled-while-waiting-for-connection-client-timeout-exceeded">post</a>. This is the contents of my <code>etc/hosts</code> file</p>
<pre><code>##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
# ::1 localhost
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
</code></pre>
<p>I also updated my <code>etc/resolve.conf</code> file with the following nameservers per advise from this <a href="https://github.com/docker/for-win/issues/611#issuecomment-531764867" rel="nofollow noreferrer">post</a>.</p>
<pre><code>nameserver 10.0.2.3
nameserver 8.8.8.8
nameserver 8.8.4.4
</code></pre>
<p>None of this worked. Did anyone also encounter this issue? Is there any recommendations to help fix this issue?</p>
<p>Here's the <a href="https://github.com/keshinpoint/Explore-California" rel="nofollow noreferrer">source code</a> if it helps! Thank you in advance :)</p>

keshinpoint
<p>I use a  work-around for this error and it is as below:</p>
<p>Firstly, tag the images using the localhost ip instead, ie</p>
<pre><code>docker tag imagename 127.0.0.1:5000/imagename
</code></pre>
<p>and,</p>
<pre><code>docker push 127.0.0.1:5000/imagename
</code></pre>
<p>I hope this works for you as well.</p>
