简体   繁体   English

我可以使用Google Cloud build中的Docker映像注册表吗?

[英]Can I use docker image registry from google cloud build?

With Google Cloud Build, I am creating a trigger to build using a Dockerfile, the end result of which is a docker image. 使用Google Cloud Build,我创建了一个使用Dockerfile进行构建的触发器,其最终结果是一个Docker映像。

I'd like to tag and push this to the standard Docker image repository (docker.io), but i get the following error: 我想标记并将其推送到标准Docker映像存储库(docker.io),但出现以下错误:

The push refers to repository [docker.io/xxx/yyy] Pushing xxx/yyy:master denied: requested access to the resource is denied 推送指向存储库[docker.io/xxx/yyy]推送xxx / yyy:master被拒绝:请求的对资源的访问被拒绝

I assume that this is because within the context of the build workspace, there has been no login to the Docker registry. 我认为这是因为在构建工作空间的上下文中,没有登录到Docker注册表。

Is there a way to do this, or do I have to use the Google Image Repository? 有没有办法做到这一点,还是我必须使用Google Image Repository?

You can configure Google Cloud Build to push to a different repository with a cloudbuild.yaml in addition to the Dockerfile. 您可以将Google Cloud Build配置为使用Dockerfile之外的cloudbuild.yaml推送到其他存储库。 You can log in to Docker by passing your password as an encrypted secret env variable. 您可以通过将密码作为加密的秘密env变量传递来登录Docker。 An example of using a secret env variable can be found here: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-secrets-credentials#example_build_request_using_an_encrypted_variable 可以在此处找到使用秘密环境变量的示例: https : //cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-secrets-credentials#example_build_request_using_an_encrypted_variable

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以将云运行与自托管/私有docker镜像注册表一起使用吗? - Can I use cloud run with self-hosted/private docker image registry? Docker 图像无法在 Google Container Registry 上构建 - Docker image fails to build on Google Container Registry 在 Google Cloud Build 中运行自定义镜像构建步骤时,如何保存对 docker 容器的更改并将其导出为 docker 镜像? - How can I save changes to a docker container and export it as a docker image when running custom image build step in Google Cloud Build? Google Cloud Build for Python app triggered docker build fails to pull pip requirement from private artefact registry - Google Cloud Build for Python app triggered docker build fails to pull pip requirement from private artefact registry 从Google Cloud Container Registry中提取Docker映像时权限被拒绝 - Permission denied when pulling Docker image from Google Cloud Container Registry Google Cloud Container Registry拒绝来自docker push的连接 - Google Cloud Container Registry refuses connection from docker push Google Cloud Code 的 Cloud Run 扩展将 Docker 镜像存储在 Cloud Storage 而不是 Artifact Registry - Google Cloud Code's Cloud Run extension stores the Docker image in Cloud Storage instead of Artifact Registry 如果我使用 docker 集线器而不是谷歌图像注册表,会如何影响我的计费? - How could affect my billing if i use docker hub instead of google image registry? 如何使用 Google Secrets Manager 在 Google Cloud Build 中创建 docker ARG? - How do I use Google Secrets Manager to create a docker ARG in Google Cloud Build? 将我的 Docker 映像部署到 Google Container Registry / Cloud Run 时出现 GCP Cloud Run 错误 - GCP Cloud Run error on deploying my Docker image to Google Container Registry / Cloud Run
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM