【发布时间】:2018-06-07 14:18:44
【问题描述】:
我在将 docker 映像上传到 GCP Container 注册表时遇到问题。我在关注instructions here。
正如您在下面的屏幕截图中看到的,我已经:
- 登录我的 google cloud shell 并通过 dockerfile 构建 docker 映像
- 正确标记了我的图像(我认为)
- 尝试使用正确的命令推送图像(我认为)
但是,我收到此错误: 拒绝:
Please enable Google Container Registry API in Cloud Console at https://console.cloud.google.com/apis/api/containerregistry.googleapis.com/overview?project=bentestproject-184220 before performing this operation.
当我点击该链接时,它会将我带到错误的项目:
当我选择自己的项目时,我可以看到确实启用了“Google Container Registry API”:
如何上传我的 docker 图像?
【问题讨论】:
-
好像推送到了错误的项目...确保您首先使用“gcloud config set project
”在 Cloud Shell 中设置正确的项目。
标签: docker google-cloud-platform gcp