停止顽固的集装箱? [英] Stopping stubborn container?

查看:252
本文介绍了停止顽固的集装箱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个容器打开连接到终端,但是 ctrl + C crtl + D 不工作停止它Ergo,我打开另一个终端,尝试

  docker stop CONTAINER_ID 

其中 CONTAINER_ID 是挂起的容器的ID。这没有工作,挂了那个终端。所以我做了一点网络研究,导致我尝试

  docker kill CONTAINER_ID 

在另一个终端。这也挂了所以我搜索了一点,发现

  docker rm -fv CONTAINER_ID 
pre>

不幸的是,这只是挂在第四个终端。有没有办法通过我失踪的码头关闭它,或者我需要在其描述中使用docker启动 kill -9 进程? / p>

我正在运行Docker版本17.03.0-ce,在OSX上构建60ccb22。

解决方案

当docker挂起来,我通常只是重新启动守护进程,客户端将断开连接。在MacOS上,这涉及到鲸鱼下降并从那里运行重启。如果我的IP地址发生变化,我经常需要这样做。



此外,与您不相关,但可能会帮助其他人,在早期版本的docker(17.03之前)有一个死锁问题,特别是日志会导致命令挂起。解决方案是一样的,重新启动docker,但在这种情况下,我也建议升级。


I have a container open attached to a terminal, but ctrl+C and crtl+D are not working to stop it. Ergo, I opened another terminal and tried

docker stop CONTAINER_ID

where CONTAINER_ID is the ID of the container that is hung. This did not work, and hung that terminal. So I did a little internet research which led me to try

docker kill CONTAINER_ID

in another terminal. This also hung. So I searched a little more and found

docker rm -fv CONTAINER_ID

This, unfortunately, just hung in a fourth terminal. Is there a way to shut it down through docker that I'm missing, or do I need to start kill -9ing the processes with "docker" in their description?

I'm running Docker version 17.03.0-ce, build 60ccb22 on OSX.

解决方案

When docker hangs like that, I usually just restart the daemon and the clients will disconnect. On MacOS, that involves going to the whale drop down and running the restart from there. I often need to do this if my IP address changes.

Also, not relevant to you but may help others in the future, on earlier versions of docker (before 17.03) there is a deadlock issue especially with logs that would cause commands to hang. The solution is the same, restarting docker, but in this case I'd also recommend upgrading.

这篇关于停止顽固的集装箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆