容器卡死问题恢复

  1. 现象,无法进入容器,也无法停止容器。

  2. 强制停止容器。

docker rm -f {containerName}
  1. 使用compose创建,提示网络端点已存在。
endpoint with name {containerName} already exists in network host
  1. 我用的是host模式,检查host网络。
docker network inspect host

...
"2b0d6b6560b3fb4cdf63279fdc444077e2d051b838f857eba7bc783934c8e170": {
    "Name": "{containerName}",
    "EndpointID": "cce37472e296836974240b93daddbc0f2977806f9b76e07684058bc3a3c1b0f6",
    "MacAddress": "",
    "IPv4Address": "",
    "IPv6Address": ""
}
...
  1. 从host中删除该容器的端点。
docker network disconnect -f host {containerName}
  1. 使用compose重新创建,成功。

posted on 2023-12-29 11:55  shangyingbin  阅读(107)  评论(0)    收藏  举报

导航