I ran the following command
gcloud preview docker push gcr.io/project-name/an-image
And I got the following error. Does anyone know how I fix that or what it means? All I was doing was following the standard examples just to learn how it works... Thanks :)
FATA[0010] Error: v1 ping attempt failed with error: Get https://gcr.io/v1/_ping: dial tcp: i/o timeout. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add --insecure-registry gcr.io
to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/gcr.io/ca.crt
ERROR: (gcloud.preview.docker) A Docker command did not run successfully. Tried to run: 'docker push gcr.io/project-name/an-image' Exit code: 1
The error means that docker had problem connecting to the https://gcr.io/v1/_ping url, and the tcp connection timed out.
The most likely cause is a fluke in the connection between your ISP and Google. Try running "curl https://gcr.io/v1/_ping" a couple of times and see if it connects correctly (it should return "true" as the body of the request). If not, try pinging gcr.io to see if you can reach the server at all.
Docker <1.7 has a 5 second timeout for resolving gcr.io, connecting, and performing the ping.
We basically never see this crossing ~100ms once it hits our front-end, and when we've managed to catch consistent failures, it has almost universally been due to slow name resolution.
Fortunately, 1.7 finally raises this to 30 seconds, which should at least mitigate this issue.
I ran into this issue, and for me, it was not an ISP issue,
curl https://us.gcr.io/v1/_ping
worked fine. However, restarting my docker machine did the trick: