I created a Docker image ($DOCKER_IMAGE_NAME) using Google Cloud Build (GCB). I don't seem to be able to pull $DOCKER_IMAGE_NAME:
docker pull us-central1-docker.pkg.dev/. . ./$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG
#=>
Error response from daemon: Get https://us-central1-docker.pkg.dev/. . ./$DOCKER_IMAGE_NAME/v1: denied: Permission "artifactregistry.repositories.downloadArtifacts"denied on resource "projects/. . ./$DOCKER_REPOSITORY_NAME" (or it may not exist)
How can I pull $DOCKER_IMAGE_NAME?
The error message seems to indicate that you need to grant permissions.
You will need to run the
add-iam-policy-bindingcommand:where
$ROLEisartifactregistry.repositories.downloadArtifacts.See this for more information.