当前位置: 首页 > 知识库问答 >
问题:

用不同的图像ID删除docker图像错误“没有这样的ID”

章鸿光
2023-03-14
parallels@ubuntu:~$ sudo docker images
[sudo] password for parallels: 
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              14.10               525b6e4a4cc8        6 days ago          194.4 MB
<none>              <none>              4faa69f72743        6 days ago          188.3 MB
<none>              <none>              78949b1e1cfd        3 weeks ago         194.4 MB
<none>              <none>              2d24f826cb16        3 weeks ago         188.3 MB
<none>              <none>              1f80e9ca2ac3        3 weeks ago         131.5 MB
<none>              <none>              5ba9dab47459        6 weeks ago         188.3 MB
<none>              <none>              c5881f11ded9        9 months ago        172.2 MB
<none>              <none>              463ff6be4238        9 months ago        169.4 MB
<none>              <none>              195eb90b5349        9 months ago        184.7 MB
<none>              <none>              3db9c44f4520        10 months ago       183 MB
parallels@ubuntu:~$ sudo docker rmi 4faa69f72743
Error response from daemon: No such id: 2103b00b3fdf1d26a86aded36ae73c1c425def0f779a6e69073b3b77377df348
2015/03/16 20:32:38 Error: failed to remove one or more images
parallels@ubuntu:~$ 

在这里,您可以看到我尝试删除4FAA69F72743。但是,docker坚持认为我正在尝试删除2103b00...,并且由于这样的图像不存在而出错。

什么可能导致这一切?

共有1个答案

袁高峰
2023-03-14

我不明白它的原因,但我找到了解决办法。

在这里,Docker ps-a显示已退出的容器,其图像ID与问题哈希值匹配。

parallels@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
parallels@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                    PORTS               NAMES
1c538a69a522        2103b00b3fdf        bash                3 hours ago         Exited (-1) 3 hours ago                       sharp_mccarthy         
d9b683ddec73        2103b00b3fdf        bash                3 hours ago         Exited (0) 3 hours ago                        nostalgic_davinci      
fcf8f628066f        2103b00b3fdf        bash                3 hours ago         Exited (0) 3 hours ago                        drunk_rosalind         
06591014c89a        2103b00b3fdf        sleep 10            3 hours ago         Exited (0) 3 hours ago                        sleepy_goldstine       
cb54fe012231        2103b00b3fdf        sleep 10            3 hours ago         Exited (0) 3 hours ago                        compassionate_leakey   
de9cc4cbefe5        2103b00b3fdf        sleep 10            3 hours ago         Exited (0) 3 hours ago                        agitated_brattain      
0ac0e70451cd        2103b00b3fdf        ps -a               3 hours ago         Exited (1) 3 hours ago                        berserk_goldstine      
a6cc821ab7a4        2103b00b3fdf        whoami              3 hours ago         Exited (0) 3 hours ago                        distracted_pare        
89f0c413787a        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                        silly_hawking          
5388489a2df2        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                        pensive_wozniak        
1a060874271f        ubuntu:14.10        pwd                 3 hours ago         Exited (0) 3 hours ago                        determined_goldstine   
5bf4d049e3d2        ubuntu:14.10        pwd                 3 hours ago         Exited (0) 3 hours ago                        angry_hypatia          
2033e10cb026        ubuntu:14.10        ls                  3 hours ago         Exited (0) 3 hours ago                        desperate_poincare     
54f6f631cf17        ubuntu:14.10        ls                  3 hours ago         Exited (0) 3 hours ago                        cranky_davinci         
c44eb12aeedf        ubuntu:14.10        bash                3 hours ago         Exited (0) 3 hours ago                        high_darwin            
64f14a9cf537        ubuntu:14.10        ps                  3 hours ago         Exited (0) 3 hours ago                        goofy_morse            
4b8f2516ddbd        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                        high_ardinghelli       
0e3a3a6a8582        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                        dreamy_turing          
49397f5bf47f        ubuntu:14.10        ls                  3 hours ago         Exited (0) 3 hours ago                        grave_hoover           

试图删除图像失败。

parallels@ubuntu:~$ sudo docker rmi 2103b00b3fdf
Error response from daemon: No such image: 2103b00b3fdf
2015/03/16 22:35:45 Error: failed to remove one or more images
parallels@ubuntu:~$ sudo docker rm 1c538
1c538
parallels@ubuntu:~$ sudo docker rm d9b fcf 065 cb5 de9 0ac a6c
d9b
fcf
065
cb5
de9
0ac
a6c
parallels@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
parallels@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                   PORTS               NAMES
89f0c413787a        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                       silly_hawking          
5388489a2df2        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                       pensive_wozniak        
1a060874271f        ubuntu:14.10        pwd                 3 hours ago         Exited (0) 3 hours ago                       determined_goldstine   
5bf4d049e3d2        ubuntu:14.10        pwd                 3 hours ago         Exited (0) 3 hours ago                       angry_hypatia          
2033e10cb026        ubuntu:14.10        ls                  3 hours ago         Exited (0) 3 hours ago                       desperate_poincare     
54f6f631cf17        ubuntu:14.10        ls                  3 hours ago         Exited (0) 3 hours ago                       cranky_davinci         
c44eb12aeedf        ubuntu:14.10        bash                3 hours ago         Exited (0) 3 hours ago                       high_darwin            
64f14a9cf537        ubuntu:14.10        ps                  3 hours ago         Exited (0) 3 hours ago                       goofy_morse            
4b8f2516ddbd        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                       high_ardinghelli       
0e3a3a6a8582        ubuntu:14.10        whoami              3 hours ago         Exited (0) 3 hours ago                       dreamy_turing          
49397f5bf47f        ubuntu:14.10        ls                  3 hours ago         Exited (0) 3 hours ago                       grave_hoover           
parallels@ubuntu:~$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              14.10               525b6e4a4cc8        6 days ago          194.4 MB
<none>              <none>              4faa69f72743        6 days ago          188.3 MB
<none>              <none>              78949b1e1cfd        3 weeks ago         194.4 MB
<none>              <none>              2d24f826cb16        3 weeks ago         188.3 MB
<none>              <none>              1f80e9ca2ac3        3 weeks ago         131.5 MB
<none>              <none>              5ba9dab47459        6 weeks ago         188.3 MB
<none>              <none>              c5881f11ded9        9 months ago        172.2 MB
<none>              <none>              463ff6be4238        9 months ago        169.4 MB
<none>              <none>              195eb90b5349        9 months ago        184.7 MB
<none>              <none>              3db9c44f4520        10 months ago       183 MB
parallels@ubuntu:~$ sudo docker rmi 4faa
Deleted: 4faa69f72743ce3a18508e840ff84598952fc05bd1de5fd54c6bc0f8ca835884
Deleted: 76b658ecb5644a4aca23b35de695803ad2e223da087d4f8015016021bd970169
Deleted: f0dde87450ec8236a64aebd3e8b499fe2772fca5e837ecbfa97bd8ae380c605e
parallels@ubuntu:~$ 
 类似资料:
  • 在这里,您可以看到我已经尝试删除。但是,docker坚持认为我正在尝试删除,结果错误了,因为这样的映像不存在。 是什么原因造成的?

  • 好吧,我是Docker的新手,正在做一些教程,我想删除和图像: 所以我从开始: 为什么这不起作用? 最后我发现确实删除了图像,但我仍然不明白为什么这不起作用。 第一列是什么?这是映像名称,还是其他名称? 如果是映像名称,那么为什么不能使用删除映像? 如果不是映像名称,则 是什么? 为什么显示它而不是图像名称? 如何获取实际的映像名称?具体是什么?我还尝试了和但未成功。

  • 我想删除一个本地图像标记(“存储库”/“标记”组合)。有可能吗? 我如何才能在仅与一个图像ID相关联的多个标记中删除任何一个标记而不删除其他标记?在我的情况下,我只想排除hiworld存储库。我可以删除图像,因此也可以删除与之相关联的所有标签,但这不是我想要做的。下面是输入命令docker images时显示的内容。 提前道谢。

  • 我在努力 服务器:版本:1.11.2 API版本:1.23 Go版本:Go1.5.4 Git提交:b9f10c9构建:Wed Jun 1 22:00:43 2016 OS/arch:linux/amd64

  • 我有以下图片: 当我试图移除其中一个时,我得到: 我怎样才能移除它们?为什么会有这样的冲突?

  • 和以下内容: 获取以下错误: