image is being used by stopped container

前端 未结 9 413
自闭症患者
自闭症患者 2021-01-30 05:08

I am trying to delete a docker container by this command:

docker rmi 

Obviously, I have replaced the Image-Id by the Id I get u

9条回答
  •  被撕碎了的回忆
    2021-01-30 05:22

    You may also find that you have stopped containers that are causing the lock. Remove these first using:

    docker rm  $(docker ps -q -a)
    

    Here we are listing the docker processes by just the ID and then removing those; however, docker rm will only remove stopped containers.

    Next go back and remove the images using:

    docker image rm 
    

提交回复
热议问题