Error response from daemon: conflict: unable to delete (must be forced) - image is(镜像删除)

执行docker rmi f6b4c8fe4763删除镜像时,

Error response from daemon: conflict: unable to delete f6b4c8fe4763 (must be forced) - image is being used by stopped container fec1f991a371

查看镜像:
在这里插入图片描述

查看容器:
在这里插入图片描述

解决方案一:

docker rmi  f6b4c8fe4763

解决方案二:

先删除容器,执行:

docker rm fec1f991a371

再删除镜像,执行

docker rmi  f6b4c8fe4763

推荐使用方案二

你可能感兴趣的:(问题,java,docker,镜像,删除)