Home  >  Article  >  Operation and Maintenance  >  What should I do if docker cannot delete the image?

What should I do if docker cannot delete the image?

王林
王林Original
2020-03-25 17:38:512761browse

What should I do if docker cannot delete the image?

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!

Statement:
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