gcloud应用程序使用私有Docker映像进行部署

编程入门 行业动态 更新时间:2024-10-28 08:22:39
本文介绍了gcloud应用程序使用私有Docker映像进行部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个项目,该项目的内部和外部都有一个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映像进行部署

本文发布于:2023-11-13 23:06:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1585571.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:映像   应用程序   gcloud   Docker

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!