我试图将Google Container Registry中的Docker图像转换为Google Compute Engine实例. (我需要的图像已成功上传到GCR.)
>我已使用gcloud auth登录登录,然后尝试了gcloud docker pull – us.gcr.io/app-999/app导致错误:(gcloud.docker)Docker未安装..
>我尝试使用oauth进行身份验证并通过正常的docker调用进行验证.当我查看.docker / config.json中的文件时,我看到了我的凭据.这样做,看起来它会起作用,但最终会像这样结束:
mbname @ instance-1~ $docker pull – us.gcr.io/app-999/app
使用默认标签:最新
最新:从app-999 / app拉
b7f33cc0b48e:拉出fs图层
43a564ae36a3:拉动fs层
b294f0e7874b:拉出fs图层
eb34a236f836:等待
错误拉图像配置:未授权:需要验证
看起来像进步,因为至少它试图下载一些东西.
我已经在我的本地机器上尝试了这两种方法,两种方法都是成功的.
我错过了什么吗?
谢谢你的帮助.
附:我也尝试从另一个注册表加载一个容器(
Docker Hub)并且运行良好,但我需要多个容器,并希望降低费用.
最佳答案
联系Google支持后,他们告诉我CoreOS gcloud别名中存在错误.通过覆盖shell中的别名来修复此错误,如下所示:
alias gcloud='(docker images google/cloud-sdk || docker pull google/cloud-sdk) > /dev/null;docker run -t -i --net=host -v $HOME/.config:/.config -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker google/cloud-sdk gcloud'
我试过这个,它现在有效.
相关文章
- google-compute-engine - gcloud docker push 403 Forbidden
- docker - 如何从Google容器注册表中干净地删除容器图像?
- google-cloud-platform - 在Docker Container内的Container OS上访问Google Cloud服务帐户凭据
- google-cloud-platform - 无法将Docker镜像从Google Container Registry中拉入Kubernetes Pod
- 如何使用python / listing docker images获取GCR访问令牌
- java - Google Cloud Platform:无法从Container Engine访问Pubsub
- docker - Google Container Engine上的跨区域负载平衡路由
- google-compute-engine - 无法访问Google Cloud Compute Instance外部IP
转载注明原文:docker – 无法从Google Compute Engine访问Google Container Registry - 代码日志