Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution that docker container can't stop

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The solution is as follows:

1. Force deletion of containers

Docker rm-f jenkins

2. Clean up the network occupancy of this container

Docker network disconnect-force bridge jenkins

Docker cannot stop,kill the container

Recently, when I encountered that docker could not be deleted, or the corresponding container of kill, either after running docker stop xxx, it was found that xxx still existed, or it could not be deleted at all, or it would report an error, prompting Error response from daemon: Conflict, cannot remove the default name of the container

The possible reason for this is that at some point in the past, a named container has been created, and then you have kept it running. After that, the host restarts for any reason and does not gracefully terminate the container. The remaining files now seem to prevent you from regenerating the new container with the old name, because the system believes that the old container still exists.

Let's first use docker ps-a to look at the running records of all containers, and containers that exit in an abnormal way will have a non-zero status code. Search for the desired name by name, and then delete the docker rm xxxxxx using the actual hexadecimal code.

However, sometimes it is found that-a has no extra information. You can delete the container manually. Delete the corresponding folder under / var/lib/docker/containers/, delete it, use root permission, and then systemctl restart docker.

This is the end of this article on the docker container can not stop solutions, more relevant docker containers can not stop what to do, please search the previous articles or continue to browse the following related articles hope that you will support more in the future!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report