首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在GCP容器注册表中推送图像

无法在GCP容器注册表中推送图像
EN

Stack Overflow用户
提问于 2020-06-23 06:31:07
回答 1查看 426关注 0票数 0

我按照本教程设置Kubernetes

https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app

我没有使用教程中的hello项目,而是从自己的Docker存储库下载了一个映像。这是卡桑德拉的照片

代码语言:javascript
复制
docker pull manuchadha25/codingjedi:3.11.4

图像是可用的(在Google控制台上检查)

代码语言:javascript
复制
manuchadha25@cloudshell:~ (copper-frame-262317)$ docker images
REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
manuchadha25/cassandra   3.11.4              ca795bbd8fd7        8 months ago        324MB
manuchadha25@cloudshell:~ (copper-frame-262317)$

现在我想将映像推送到Container (我认为这是Google自己的注册中心,Kubernetes使用它来创建具有所需图像的新节点)。当我试图推送图像时,我得到了这个错误。

代码语言:javascript
复制
manuchadha25@cloudshell:~ (copper-frame-262317)$ docker push gcr.io/${PROJECT_ID}/manuchadha25/cassandra:3.11.4
The push refers to repository [gcr.io/copper-frame-262317/manuchadha25/cassandra]
An image does not exist locally with the tag: gcr.io/copper-frame-262317/manuchadha25/cassandra
manuchadha25@cloudshell:~ (copper-frame-262317)$

我做错了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-23 06:54:18

如果您想要从GCR加载对接者映像,则需要添加带有GCR标记的图像版本。

首先阅读以下内容:码头标签

事情是这样的。如果您只是想运行您的码头形象,您可以这样做。没有必要将您的图像推送到GCR。

通过运行docker pull manuchadha25/cassandra:3.11.4,您可以从码头枢纽中提取图像。你只要做这个就行了。如果你真的需要把你的对接者形象推到你的项目的GCR中,你必须告诉对接者GCR“生活在哪里”。

这是通过将图像标记到GCR上来完成的。GCR的标签有三个不同的部分。

注册位置:项目ID

gcr.io \x\x{所有的}\卡桑德拉\x{}

所以,在你的例子中,你会运行:

docker tag manuchadha25/cassandra:3.11.4 gcr.io/${whateveryouridis}/cassandra:3.11.4

超过:

docker push gcr.io/${whateveryouridis}/cassandra:3.11.4

,但我不能强调这一点,

您可以这样做,但您似乎只想在GC k8s中运行您的码头映像。试试docker run manuchadha25/cassandra:3.11.4吧。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62528628

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档