Search code examples
dockergoogle-container-registry

Google Container Registry: push reports "Repository does not exist"


I have build a docker image in Google Cloud Shell and now want to push it into Google Container Registry (GCR). I receive the following error messages:

$ sudo docker push eu.gcr.io/<project>/<image>
The push refers to a repository [eu.gcr.io/<project>/<image>] (len: 0)
Repository does not exist: eu.gcr.io/<project>/<image>

Yet I can see the very repository and its content in Google Cloud Console (i.e. inside the same browser window as Google Cloud Shell) and this has also worked before. I have also previously executed gcloud docker for authentication.

What could be wrong and how can I successfully push the Docker image into GCR?


Solution

  • I have reverted to using a dedicated VM instance (instead of Google Cloud Shell) for building and pushing images. This makes the problem go away.