问题:
不能停止、杀死、删除容器,使用以下命令得到错误消息:
docker stop <container-id>
Error response from daemon: cannot stop container: <container-id>: tried to kill container, but did not receive an exit event
docker kill <container-id>
Error response from daemon: cannot kill container: <container-id>: tried to kill container, but did not receive an exit event
docker rm <container-id>
Error response from daemon: You cannot remove a running container <container-id>. Stop the container before attempting removal or force remove
无法停止、杀死、删除容器,因为没有接收退出事件“receive an exit event”。
解决方法:
没有找到强制停止容器的方法,只能重启容器:
# for Linux
systemctl restart docker
# for Mac
# 杀死应用程序并重新打开
killall Docker && open /Applications/Docker.app