【发布时间】:2020-11-25 22:48:08
【问题描述】:
我正在尝试将本地创建的 docker 映像(graalvm,Mac 上的 docker 桌面)上传到 gcp(具有真实项目 ID)。
我看到以下错误:
% docker push grc.io/<project>/facility
The push refers to repository [grc.io/<project>/facility]
Get https://grc.io/v2/: Service Unavailable
我设置了 gcloud 身份验证:
gcloud auth configure-docker
我的.docker/config.json 看起来像这样
{
"experimental" : "disabled",
"credHelpers" : {
"gcr.io" : "gcloud",
"us.gcr.io" : "gcloud",
"eu.gcr.io" : "gcloud"
},
"auths" : {
},
"stackOrchestrator" : "swarm"
}
跑步
echo "https://gcr.io" | docker-credential-gcloud get
提供一个令牌。
有什么问题?
-- 更新--
当我运行这个(工作)
gcloud container images list --repository=gcr.io/<project-id> --log-http
它正在与https://gcr.io/v2/token?.. 交谈。上面的 docker-credential-gcloud 正在与 https://oauth2.googleapis.com/token 交谈。
【问题讨论】:
-
将 https 添加到您的推送命令中?
-
错误消息显示 https://.... 添加 https 会产生另一个错误
invalid reference format。
标签: docker google-cloud-platform google-cloud-run google-container-registry