博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
解决删除镜像时image is referenced in multiple repositories
阅读量:2062 次
发布时间:2019-04-29

本文共 1183 字,大约阅读时间需要 3 分钟。

1、查看镜像 docker images

rt@123:~# docker imagesREPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZE192.168.0.1/jii/jenkins                    1.0.1              3391ef1391f6        18 hours ago        206 MB192.168.0.1/you/tom                        1.0.8              f8ab12e03d53        22 hours ago        276 MB192.168.0.1/you/tom                        1.0.9              f8ab12e03d53        22 hours ago        276 MB

2、删除镜像,会报错

rt@123:~# docker rmi f8ab12e03d53

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

仔细观察,发现f8ab12e03d53这个镜像id指向了两个repository,因此无法删除

3、删除时可以用repository和tag的方式来删除

rt@123:~# docker rmi 192.168.0.1/you/tom:1.0.8Untagged:192.168.0.1/you/tom:1.0.8
 

4、再次查看镜像,1.0.8的就被删除了。

rt@123:~# docker imagesREPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZE192.168.0.1/jii/jenkins                    1.0.1              3391ef1391f6        18 hours ago        206 MB192.168.0.1/you/tom                        1.0.9              f8ab12e03d53        22 hours ago        276 MB

 

转载地址:http://ofhlf.baihongyu.com/

你可能感兴趣的文章
阿里云《云原生》公开课笔记 第九章 应用存储和持久化数据卷:核心知识
查看>>
linux系统 阿里云源
查看>>
国内外helm源记录
查看>>
牛客网题目1:最大数
查看>>
散落人间知识点记录one
查看>>
Leetcode C++ 随手刷 547.朋友圈
查看>>
手抄笔记:深入理解linux内核-1
查看>>
内存堆与栈
查看>>
Leetcode C++《每日一题》20200621 124.二叉树的最大路径和
查看>>
Leetcode C++《每日一题》20200622 面试题 16.18. 模式匹配
查看>>
Leetcode C++《每日一题》20200625 139. 单词拆分
查看>>
Leetcode C++《每日一题》20200626 338. 比特位计数
查看>>
Leetcode C++ 《拓扑排序-1》20200626 207.课程表
查看>>
Go语言学习Part1:包、变量和函数
查看>>
Go语言学习Part2:流程控制语句:for、if、else、switch 和 defer
查看>>
Go语言学习Part3:struct、slice和映射
查看>>
Go语言学习Part4-1:方法和接口
查看>>
Leetcode Go 《精选TOP面试题》20200628 69.x的平方根
查看>>
Leetcode C++ 剑指 Offer 09. 用两个栈实现队列
查看>>
Leetcode C++《每日一题》20200707 112. 路径总和
查看>>