解决Docker无法删除镜像 - image is referenced in multiple

在一次更新docker服务的时候删除镜像提示如下

root@newings:/u01/ace# docker rmi 36409c136541
Error response from daemon: conflict: unable to delete 36409c136541 (must be forced) - image is referenced in multiple repositories
root@newings:/u01/ace# docker rmi 36409c136541
Error response from daemon: conflict: unable to delete 36409c136541 (must be forced) - image is referenced in multiple repositories

 查看镜像发现,同一个IMAGE ID被多个REPOSITORY引用

root@newings:/u01/ace# docker images
REPOSITORY                                      TAG                 IMAGE ID            CREATED             SIZE
ace-gate                                        v1.1                36409c136541        10 minutes ago      235MB
ace-gate                                        v9                  36409c136541        10 minutes ago      235MB

 查阅资料,可以用如下方法解决

root@newings:/u01/ace# docker rmi ace-gate:v9
Untagged: ace-gate:v9

 然后在删除另外一个IMAGE ID就可以了

root@newings:/u01/ace# docker rmi 36409c136541
Untagged: ace-gate:v1.1
Deleted: sha256:36409c136541e84a1ede1f2300db1a1f6ad736b398d4f9464177d0a482c9ef24
Deleted: sha256:f6107cb6fcd3b72284c53a92ec234126206aa6fb2958bad2bdd37fb6fa705cc2
Deleted: sha256:499658fe98ab13d9d682583fda19a799732887fe48daec719173f014de34ace1
Deleted: sha256:6dd33e9f034b64021b37ff9d1bfb95305d3c53a1213ba880ef290cc567eca7eb
Deleted: sha256:c587ffd76622c6a116274d473442d5fd71626da67c146c4511896be04df82c76
Deleted: sha256:fd83bb97a2ee03a8eae8bd496f7cc72c1abe7cbbb819f289f077597b06b86888

 参考博客:https://blog.csdn.net/JackLiu16/article/details/80581709

posted @ 2019-05-29 10:32  小年青。  阅读(2501)  评论(0编辑  收藏  举报