Reputation: 2886
I'm creating a virtual machine in Google Cloud with full access scopes
When I connect to the virtual machine by SSH and try to pull a docker image from Container registry, it throws permissions error:
So I wonder how do I give permissions for my Container registry
I thought giving full access to API would solve this problem, but it doesn't
By the way I know I can directly put image from container registry to compute engine, but this is not what I want, it's not gonna be only one image I'll be running, it's gonna be some of them
Upvotes: 0
Views: 996
Reputation: 81386
Permissions for Container Registry are controlled by Cloud Storage IAM. Container Registry stores container images in a Cloud Storage bucket in your project.
To authorize docker
to use Google credentials there are several methods. I use this method:
gcloud auth configure-docker
However, that method is no longer recommended. This method is recommended:
gcloud components install docker-credential-gcr
docker-credential-gcr configure-docker
Container Registry Authentication Methods
Upvotes: 3