What should I do if docker cannot stop deleting containers?

WBOY
Release: 2022-07-25 16:21:35
Original
5125 people have browsed it

Solution: 1. Use “docker ps” to find the running container id; 2. Use “cd /var/lib/docker/container” to find the physical location of the specified container; 3. Use “service docker stop” "Stop the docker service; 4. Use "rm -rf /var/lib/docker/container/{specified id}" to delete the physical container, and then restart the docker service.

What should I do if docker cannot stop deleting containers?

The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.

What should I do if docker cannot stop deleting the container?

Solution:

1. Find the running container id

docker ps
Copy after login

2. Find the physical location of the container above

cd /var/lib/docker/container
ls -a
#此处会显示所有容器的id,找出上面那个无法停止删除的id(8位)
Copy after login

3. Stop the docker service first

service docker stop
Copy after login

4. Delete the physical container

rm -rf /var/lib/docker/container/{上面找到的id}
Copy after login

Restart the docker service

service docker start
Copy after login

Expand knowledge

Docker exits the container without stopping the container and re-enters the running container

How docker exits the container (note that it is inside the running container at this time):

Start the container

What should I do if docker cannot stop deleting containers?

Exit the container and end the container running exit

What should I do if docker cannot stop deleting containers?

Exit the container but the container is still executing ctrl p q and will return to the host desktop

What should I do if docker cannot stop deleting containers?

But the container is still executing

What should I do if docker cannot stop deleting containers?

How to return to a container that has exited but is still running

Method 1: docker attach container id

What should I do if docker cannot stop deleting containers?

##Method 2: docker exec -it container ID bashShell

What should I do if docker cannot stop deleting containers?

Recommended learning: "

docker video tutorial"

The above is the detailed content of What should I do if docker cannot stop deleting containers?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template