页首自改代码

Hey, Nice to meet You.  why ?

☆☆☆所谓豪杰之士,必有过人之节.人情有所不能忍者,匹夫见辱,拔剑而起,挺身而斗,此不足为勇也,天下有大勇者,猝然临之而不惊,无故加之而不怒.此其所挟持者甚大,而其志甚远也.          
返回顶部

Docker删除镜像报错

问题描述:

笔者意图删除nginx-file的镜像文件,但通过命令删除镜像时出现报错信息,提示存在多个引用(即一个IMAGE可被多个REPOSITORY引用,故删除会出现失败),如下:

[root@kazihuo ~]# docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
kazihuo/nginx       v1                60c22883bb42        6 minutes ago       372 MB
nginx-file          v1                60c22883bb42        6 minutes ago       372 MB

[root@kazihuo ~]# docker rmi 60c22883bb42

Error response from daemon: conflict: unable to delete 60c22883bb42 (must be forced) - image is referenced in multiple repositories

 

解决方案:

当指定IMAGE ID删除报错时,可直接通过REPOSITORY:TAG的方式删除;

[root@kazihuo ~]# docker rmi nginx-file:v1

Untagged: nginx-file:v1

[root@kazihuo ~]# docker images

REPOSITORY       TAG                 IMAGE ID            CREATED             SIZE

kazihuo/nginx    v1                  60c22883bb42       11 minutes ago      372 MB

 

posted on 2018-06-24 17:23  罗穆瑞  阅读(291)  评论(0编辑  收藏  举报

导航