简体   繁体   English

从本地Docker存储库中提取图像

[英]Pulling image from local docker repository

Cannot pull image from local repository inside Minikube 无法从Minikube内部的本地存储库中提取图像

I have a local docker repository set up on my local machine (mac). 我在本地计算机(mac)上设置了本地docker存储库。 I only have two images stored in there. 我只有两个图像存储在那里。 I'm setting up various containers with Kubernetes definition files and on of my configurations is a replication controller that pulls the image from my repository which works fine. 我正在使用Kubernetes定义文件设置各种容器,并且在我的配置中,有一个复制控制器可以从我的存储库中提取图像,效果很好。 The other is a PetSet which pulls from the same repository but fails. 另一个是从相同的存储库中提取但失败的PetSet。 UGH!!! 啊!!!

When I push to my local repository I use: 当我推送到本地存储库时,我使用:

localhost:5000/image/name:v1

and when I reference the image from my Kubernetes configuration I use: 当我从Kubernetes配置中引用映像时,我使用了:

{local ip addr}:5000/image/name:v1

If I SSH into my Minikube instance and try to manually pull the image I get the following: Error response from daemon: read tcp 10.0.2.15:51958->{my local ip addr}:5000: read: connection reset by peer 如果我通过SSH进入Minikube实例并尝试手动拉出映像,则会得到以下信息: Error response from daemon: read tcp 10.0.2.15:51958->{my local ip addr}:5000: read: connection reset by peer

This has been working fine until today. 直到今天,它一直运行良好。

When I start my Minikube VM I add the flag 当我启动Minikube VM时,我添加了标志

--insecure-registry={ip addr of my machine}:5000

So far I've tried 到目前为止,我已经尝试过

  • Deleting the minikube and .minikube directory (multiple times) 删除minikube和.minikube目录(多次)
  • Deleting and recreating my local repository 删除并重新创建本地存储库
  • Completely reinstalling Minikube 完全重新安装Minikube

I'm currently at a complete loss as to why one image is successfully pulled from the local repository and the other fails. 目前,对于为什么一个映像成功地从本地存储库中提取而另一个映像失败了,我却一无所知。

So, it turns out that the version of VirtualBox I was running was causing the problem. 因此,事实证明我正在运行的VirtualBox版本导致了该问题。 I was running VirtualBox version 5.0.28-r111378 , but after downgrading to an earlier release 5.0.20-r106931 the problem was solved. 我正在运行VirtualBox版本5.0.28-r111378 ,但是降级到较早的版本5.0.20-r106931 ,问题已解决。 You can view the thread that addressed this issue here 您可以在此处查看解决此问题的线程

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM