Can’t delete docker image with dependent child images

前端 未结 19 2228
挽巷
挽巷 2020-12-02 06:11

I am trying

docker rmi c565603bc87f

Error:

Error response from daemon: conflict: unable to delete c565603bc87f (ca

19条回答
  •  悲&欢浪女
    2020-12-02 06:56

    find the image id and parent id for all image created after the image in question with the following:

    docker inspect --format='{{.Id}} {{.Parent}}' $(docker images --filter since= -q)
    

    Then you call command:

    docker rmi {sub_image_id} 
    

    "sub_image_id" is ID of dependent image

提交回复
热议问题