2

I have this simple run command:

docker run -d --name interos-jenkins interos-jenkins

but I get this error:

Error response from daemon: manifest for example.com/interos-jenkins:latest not found

So for whatever reason docker is looking the image in the remote register, if I run docker images locally, I see:

REPOSITORY                                                     TAG                 IMAGE ID            CREATED             SIZE
example.com/interos-jenkins                                    latest              28b0ffed29d5        21 minutes ago      766MB
interos-jenkins                                                latest              28b0ffed29d5        21 minutes ago      766MB
example.com/interos_jenkins                                    latest              57fe1cbff2dc        About an hour ago   742MB
interos_jenkins                                                latest              57fe1cbff2dc        About an hour ago   742MB
example.com/interos                                            latest              349f61f0ba59        2 days ago          486MB
interos                                                        latest              349f61f0ba59        2 days ago          486MB
example.com/interos                                            latest              94b44ccbc9d1        2 days ago          486MB
ubuntu                                                         16.04               a3551444fc85        2 days ago          119MB
python                                                         3.7-alpine          715a1f28828d        4 days ago          87MB
jenkins/jenkins                                                lts                 15625611d6fb        2 weeks ago         704MB
centos                                                         latest              9f38484d220f        6 weeks ago         202MB
docker.elastic.co/elasticsearch/elasticsearch                  6.3.2               96dd1575de0f        9 months ago        826MB
jenkins                                                        latest              cd14cecfdb3a        9 months ago        696MB

so does anyone know why this is happening and how I can use the local images instead of the remote?

My guess is that the first match for "interos-jenkins" has the remote url in it?

Update, nvm, I was running this command beforehand and didn't realize it:

docker pull "$endpoint"/interos-jenkins:latest

I guess I still want to know if there is a way to tell docker to run an image from a remote url or to run the local one.

4

1 回答 1

1

通常,docker 首先在本地检查图像是否存在,然后尝试连接到远程存储库。

在您的情况下发生的事情是正确的,因为您尝试运行的图像确实不在本地存在。镜像名称为全名:repository/name:tag

您能否尝试指定图像全名的 docker run 命令?

如果您想以简短形式运行命令,您将需要仅使用简短名称(无存储库名称)重新标记映像。

希望这可以帮助

于 2019-04-29T21:40:31.640 回答