Open evil-shrike opened 7 months ago
Thanks for reporting this, @evil-shrike. You're correct, the workaround is gcloud auth configure-docker
. There may be an issue where the default registries configured in the environment do not include Container Registry. The configure-docker
command will fix it, but it shouldn't need to be run in the first place. I will follow up internally.
I can reproduce this issue, can this be looked into please.
I solved this with using app.json :
{
"name": "app",
"hooks": {
"prebuild": {
"commands": [
"gcloud auth configure-docker"
]
}
}
}
Other solution is to fork cloudrun-button-repo, add a call to gcloud auth configure-docker
, build the image and push it to your registry (the image should be publicly available), and then use the following link to deploy your cloud-run application
https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/xxx/xxx.git&cloudshell_image=us-east1-docker.pkg.dev/your-registry/cloudshell-custom
At the last step of pushing a built container to Container Registry the procedure fails with an
unauthenticated
error:It can be fixed via executing
gcloud auth configure-docker
.But should not it work by default? I believe so.
I think it doesn't depend on specific application but just in case here're what I built: app.json:
Dockerfile: