带有标签的图像在本地不存在:同时将图像推送到本地注册表

新手上路,请多包涵

我正在尝试将图像推送到在 minikube 中运行的本地注册表,但出现以下错误:

 Successfully built ee84225eb459
Successfully tagged user/apiserver:0.0.1

$ docker push localhost:5000/user/apiserver:0.0.1

The push refers to a repository [localhost:5000/user/apiserver]
An image does not exist locally with the tag: localhost:5000/user/apiserver

我已经尝试使用以下方法启动 minikube:

 minikube start --vm-driver xhyve --insecure-registry localhost:5000
eval $(minikube docker-env)

原文由 Amit Shah 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 774
1 个回答

您需要 标记推送 图像。标记图像时,您可以使用图像标识符 (imageId)。它在显示带有 docker images 的所有图像列表时列出。用于创建标签的语法和示例(使用 imageId)是:

 docker tag <imageId or imageName> <hostname>:<repository-port>/<image>:<tag>
docker tag af340544ed62 example.com:18444/hello-world:mytag

一旦成功创建了可以等同于版本的标签,您可以使用 docker 镜像 确认它的创建并使用以下语法发出 推送

 docker push <hostname>:<repository-port>/<image>:<tag>

有一个本地关系存储库的示例

原文由 fgul 发布,翻译遵循 CC BY-SA 4.0 许可协议

推荐问题