Docker镜像无法删除

今天删除一个docker容器的image,报如下错误:# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 2ddf21d12069 28 minutes ago 400.8 MB
ubuntu latest 063fbc9d9c89 5 weeks ago 639.8 MB
centos latest de581ba9ee7f 5 weeks ago 474.6 MB
# docker rmi 2ddf21d12069
Error response from daemon: Conflict, cannot delete 1ddf21d12069 because the container 81b3f82ccf18 is using it, use -f to force
2015/09/10 11:01:18 Error: failed to remove one or more images
# docker rmi 81b3f82ccf18
Error response from daemon: No such image: 81b3f82ccf18
2015/09/10 11:01:49 Error: failed to remove one or more images
已邀请:

采菊篱下 - 无分享不快乐 助力技术开源分享 运维一枚

赞同来自:

有依赖该image的container,你需要先删除依赖这个image的container,然后再删除image

要回复问题请先登录注册