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

2024-01-05

我试图将图像推送到在 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)

你需要tag and push图片。标记图像时,可以使用图像标识符 (imageId)。显示所有图像列表时列出docker 图片。 创建标签的语法和示例(使用 imageId)如下:

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

成功创建相当于版本的标签后,您可以使用以下命令确认其创建docker 图片并发出push语法如下:

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

有一个本地 Nexus 存储库的示例 https://help.sonatype.com/repomanager3/formats/docker-registry/pushing-images

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

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

随机推荐