Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcloud docker push hanging

When I try to push new docker images to gcr.io using gcloud docker push, it frequently makes some progress before stalling out:

$ gcloud docker push gcr.io/foo-bar-1225/baz-quux:2016-03-23
The push refers to a repository [gcr.io/foo-bar-1225/baz-quux]
762ab2ceaa70: Pushing [>                                              ]   556 kB/154.4 MB
2220ee6c7534: Pushing [===>                                           ]  4.82 MB/66.11 MB
f99917176817: Layer already exists
8c1b4a49167b: Layer already exists
5f70bf18a086: Layer already exists
1967867932fe: Layer already exists
6b4fab929601: Layer already exists
550f16cd8ed1: Layer already exists
44267ec3aa94: Layer already exists
bd750002938c: Layer already exists
917c0fc99b35: Layer already exists

The push stays in this state indefinitely (I've left it for an hour without a byte of progress). If I Ctrl-C kill this process and rerun it, it gets to the exact same point and again makes no progress.

The only workaround I've found is to restart my computer and re-run "Docker Quickstart Terminal". Then the push succeeds.

Is there a workaround for stalled pushes that doesn't require frequently rebooting my computer? (I'm on Mac OS X.)

like image 445
danvk Avatar asked Mar 23 '16 19:03

danvk


People also ask

How do I push an image to a private repository?

log into your docker hub account, and go to your global settings. There is a setting that allows you to set what your default visability is for the repositories that you push. By default it is set to public, but if you change it to private, all of your repositories that you push will be marked as private by default.


1 Answers

This seems to be an issue to docker users on Mac have ran into previously, as can be seen in this docker thread, https://github.com/docker/docker/issues/5113

While there is no clear fix, a slightly better workaround is to restart docker machine rather than your computer each time.

You can run docker-machine restart default to reset docker to a working state.

Hope that helps.

like image 118
k4leung4 Avatar answered Oct 06 '22 02:10

k4leung4