The solution that docker container can't stop
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!