Docker - Cannot remove dead container

后端 未结 20 1678
清歌不尽
清歌不尽 2020-12-22 16:28

I am unable to remove the dead container, it appears again after i restart the Docker service.

docker ps -a
CONTAINER ID         STATUS          
11667ef1623         


        
20条回答
  •  一生所求
    2020-12-22 17:18

    Actually things changed slightly these days in order to get rid of those dead containers you may try to unmount those blocked filesystems to release them

    So if you get message like this

    Error response from daemon: Cannot destroy container elated_wozniak: Driver devicemapper failed to remove root filesystem 656cfd09aee399c8ae8c8d3e735fe48d70be6672773616e15579c8de18e2a3b3: Device is Busy
    

    just run this

    umount /var/lib/docker/devicemapper/mnt/656cfd09aee399c8ae8c8d3e735fe48d70be6672773616e15579c8de18e2a3b3
    

    and you can normally remove container after that

提交回复
热议问题