我试图删除一个 Docker 镜像,但被告知它被一个已停止的容器使用:
docker image rm 7bf111746926
Error response from daemon: conflict: unable to delete 7bf111746926 (must be forced) - image is being used by stopped container ac3f2fe03cf5
但后来却docker ps
没有显示出来?
$docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
注意:docker ls
[iiuc] 是同义词并且具有相同的 [empty] 结果:
$docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
答案1
结果是:需要-a
docker ls -a
或者
docker ps -a