skip to Main Content

I’m running Docker version 20.10.5 on a Centos 7 Box. I stopped my project with docker-compose down and every container had the same message –

Error response from daemon: container <container ID>: driver "overlay2" failed to remove root filesystem: unlinkat /var/lib/docker/overlay2/<long number>/merged: device or resource busy

I’ve stopped the daemon, I’ve reinstalled Docker, I’ve tried umount, lsof, kill, and all the docker go-away commands including system prune but still they hang on.

(After re-installing Docker the status changes to Dead. When I try to delete the zombie containers their status changes to Removal In Progress)

How can I get rid of these containers?

2

Answers


  1. For people who have similar issues:
    So I had similar issue where
    docker rm -f <docker name> was hanging
    The only thing that helped me was:

    service docker restart
    
    Login or Signup to reply.
  2. On Ubuntu 22.04 with Docker engine 23.0.0 neither stopping/starting the Docker service nor a docker system prune removed the containers (still showing Removal in progress). The solution as outlined here was to manually remove the volumes associated with the container(s):

    • sudo service docker stop
    • sudo -i
    • cd /var/lib/docker/containers
    • rm -rf <container id>
    • sudo service docker start
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search