My objective for one of my work items is to build a docker image (successfully done), and push that image to GCR (Google Container Repository). I followed various articles on google documentation but it didn't work for me.
Please refer to the below sequence to Push a docker image to GCR:
Newyork:gcloud esumit$ docker --version Docker version 19.03.4, build 9013bf5
Newyork:gcloud esumit$ gcloud auth configure-docker gcloud credential helpers already registered correctly.
Newyork:gcloud esumit$ docker push gcr.io/project-research:test-service-latest The push refers to repository [gcr.io/project-research]
79e24ced7c9c: Retrying in 1 second
9ca6d3494e40: Retrying in 1 second
86859b163231: Retrying in 2 seconds
77cae8ab23bf: Retrying in 1 second
unknown: Pushing to root-level images is disabled. See https://cloud.google.com/container-registry/docs/support/deprecation-notices
However, this works :
Newyork:gcloud esumit$ gcloud container images list Listed 0 items. Only listing images in gcr.io/project-research. Use --repository to list images in other repositories.
It says :
As of April 3rd, 2018, gcloud docker is not supported for Docker client versions above 18.03.
To authenticate requests to Container Registry for client versions above 18.03, use gcloud as a Docker credential helper. To do so, run the following command:
gcloud auth configure-docker (This I already did)
On the above sequence ended with the error: "Pushing to root-level images is disabled"