image has dependent child images問題的解決

image has dependent child images問題的解決

 空間不足,想刪除一些鏡像釋放內存

 發現dangling鏡像了,但是用prune刪除不了。那就根據鏡像id直接刪除吧

Error response from daemon: conflict: unable to delete dab4af6a1392 (cannot be forced) - image has dependent child images
出現錯誤。大致意思是你有子鏡像在佔用這個鏡像。強制刪除也無法刪除。

解決方法:

查找出所有在指定 image 之後創建的 image 的父 image

docker image inspect --format='{{.RepoTags}} {{.Id}} {{.Parent}}' $(docker image ls -q --filter since=子鏡像id)

刪除成功。

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章