获取错误,同时删除dockerimage_id

docker images -a REPOSITORY TAG IMAGE ID CREATED SIZE node test 337b7fc90dbc 2 hours ago 301.8 MB <none> <none> 60d47994bba8 2 hours ago 301.8 MB <none> <none> 987deffef7bf 2 hours ago 196.7 MB docker.io/centos centos7 970633036444 4 weeks ago 196.7 MB docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 774f0d06ec9a 970633036444 "bash" 2 hours ago Exited (1) 30 minutes ago elated_cray b1f9481f6eae 337b7fc90dbc "bash" 2 hours ago Exited (0) 30 minutes ago serene_stallman 

但是,当我运行docker rmi 987deffef7bf ,得到错误

 Failed to remove image (987deffef7bf): Error response from daemon: conflict: unable to delete 987deffef7bf (cannot be forced) - image has dependent child images 

这表明另一个图像,最有可能来自时间戳的“节点”正在使用该图像作为其图层的一部分。 这是如何从图层和docker images -a创build图像的devisedocker images -a将这些工作中的一部分展示给最终用户。 如果您删除“节点”图像,这些应该自动清理。