Error response from daemon: conflict: unable to delete d8638d086558 (cannot be forced) - image has d

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


在删除镜像之前要先用 docker rm 删掉依赖于这个镜像的所有容器(哪怕是已经停止的容器),否则无法删除该镜像。


停止容器
# docker stop $(docker ps -a | grep "Exited" | awk '{print $1 }')
删除容器

# docker rm $(docker ps -a | grep "Exited" | awk '{print $1 }') 

# docker rm -v $(docker ps -aq -f status=exited)

删除镜像

# docker rmi $(docker images | grep "none" | awk '{print $3}')

你可能感兴趣的:(docker)