解决删除镜像时image is referenced in multiple repositories
生活随笔
收集整理的這篇文章主要介紹了
解决删除镜像时image is referenced in multiple repositories
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、查看鏡像 docker images
[root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE xuxueli/xxl-job-admin 2.3.0 24cc0d9dcf54 5 days ago 223MB mysql latest c8562eaf9d81 3 weeks ago 546MB redis 5 e35748fd6a72 4 weeks ago 98.4MB 192.168.43.119:80/test/busybox latest 754228d7562e 7 weeks ago 1.23MB busybox_test 1.0.0 754228d7562e 7 weeks ago 1.23MB docker_test latest 754228d7562e 7 weeks ago 1.23MB2、刪除鏡像,會報錯
[root@localhost ~]# docker rmi 754228d7562e 754228d7562e 754228d7562e
Error response from daemon: conflict: unable to delete 754228d7562e (must be forced) - image is referenced in multiple repositories
仔細觀察,發現754228d7562e這個鏡像id指向了兩個repository,因此無法刪除
3、刪除時可以用repository和tag的方式來刪除
[root@localhost ~]# docker rmi 192.168.43.119:80/test/busybox:latestUntagged: 192.168.43.119:80/test/busybox:latest Untagged: 192.168.43.119:80/test/busybox@sha256:5e8c842ceb8843c244a341f42bfb9ac701551d8ce6b23155be21ca2606de6bae4、再次查看鏡像,192.168.43.119:80/test/busybox:latest的就被刪除了。
[root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE xuxueli/xxl-job-admin 2.3.0 24cc0d9dcf54 5 days ago 223MB mysql latest c8562eaf9d81 3 weeks ago 546MB redis 5 e35748fd6a72 4 weeks ago 98.4MB docker_test latest 754228d7562e 7 weeks ago 1.23MB busybox_test 1.0.0 754228d7562e 7 weeks ago 1.23MB總結
以上是生活随笔為你收集整理的解决删除镜像时image is referenced in multiple repositories的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SpringBoot 整合 Shiro
- 下一篇: shell脚本触发java程序支持传参补