Search code examples
dockercontainers

Docker image corruption? Remove layers?


After a system restart, it looks like the docker images which were existing are corrupted.

I tried the following-

  1. Rebuild a docker inside that machine - this worked. This image is running fine.
  2. I pulled an image which was already existing, it said layers already exist. But this image still seems to be corrupted.

I feel that removing the image will help. When I try removing, it seems to remove only the tag. It is not removing all the layers. How can I do this?

I tried docker rmi. The image got removed.

Now, I try to pull the image again, some of the layers are already existing. I am trying to run the docker, it says oci runtime error ..... file not found.

These images are working on other machines, and was working on this machine till some hours before.


Solution

    1. Stop docker service
    2. Remove /var/lib/docker
    3. Start docker service