Problem description:
I recently planned to delete docker images, but I found that there are several images that cannot be deleted. Even adding -f to force deletion does not work, and an Error is reported all the time. : No such container error.
The solution is as follows:
1. Switch to the root user;
2. Execute the following commands in sequence:
service docker stop rm -rf /var/lib/docker start docker.service
Recommended tutorial:docker Tutorial
The above is the detailed content of What should I do if docker cannot delete the image?. For more information, please follow other related articles on the PHP Chinese website!