docker rmi error image is being used by running container

reference:http://www.jb51.net/article/102168.htm

# docker rmi e934aafc2206
Error response from daemon: conflict: unable to delete e934aafc2206 (cannot be forced) - image is being used by running container 1a6c11fd49b8

无法删除docker image

解决方法:

1.先查询记录 docker ps -a

2.把该镜像的记录全部删除掉,如果删除所有镜像的记录,可以使用:docker ps -a|awk ‘{print $1}’|xargs docker rm

3.docker rmi 5e4f2da203e2就可以了

网上还有网友使用service docker restrat 之后再删,本人试了一下不管用,可能是因为环境不一样,哈哈!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.