我有一个项目,该项目的内部和外部都有一个Dockerfile,该Dockerfile是基本的私有映像.当我运行 gcloud app deploy 时,它将返回错误并显示以下消息
I have a project that has a Dockerfile inside and inside that Dockerfile is a base private image. When I run gcloud app deploy it will return an error with the below message
Error response from daemon: pull access denied for dean, repository does not exist or may require 'docker login'在运行 gcloud app deploy 之前,我尝试过 docker login ,但是它不起作用
I tried docker login before running gcloud app deploy but it did not work
推荐答案提供docker文件时,容器是从云而不是本地构建的.因此您的私人基本容器在构建时将不可用.最好的方法是在本地构建容器,然后推送到docker hub或gcr存储库.他们可以通过以下命令将容器推入仓库中
When you provide the docker file,a container is build from the cloud rather than locally. so your private base container will not be available while building. The best way is to build the container locally,then push to docker hub or gcr repository. They you can push the container in the repo by the command below
gcloud app deploy --image-url=[HOSTNAME]/[PROJECT-ID]/[IMAGE]查看文档以获取更多信息 cloud.google/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry
check on the documentation for more info cloud.google/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry
更多推荐
gcloud应用程序使用私有Docker映像进行部署
发布评论