Andrew Maxwell

How to fix upload timesouts with Google Container Registry

November 20, 2016

I was having issues having my docker images uploading to Google Container Registry. This has happened to me on a few occassions and I couldn’t figure out what was wrong and then when it started working again I didn’t know what fixed it.

This past Wednesday it happened to me again. I tried to use the simple command:

gcloud docker -- push

And it sat there for a couple minutes until I got this error:

Post dial tcp i/o timeout

Pretty helpful huh? After I got this message I did a bunch of research and came across Google’s documentation for the container registry. It wasn’t helpful either.

After diving into the issue for a few hours I came across a similar issue with Docker itself.

How to really fix it:

  1. Open up your network preferences on your Mac (these should work for other OSes as well)
  2. Click on “advanced”
  3. Click the “DNS” tab
  4. Click the “+” button to add a new DNS servers
  5. Enter in the following values and click save
That’s it. Try the command again and forever you will be golden.

Leave a Reply

You must be logged in to post a comment.