在删除docker的镜像时,明明所删除的对应的容器已经变成了Exited状态了(我以为这个状态表示关闭了),但却报了个错

docker之container eb7a144fe8ce is using its referenced image 9b9cb95443b5

 

 这表明虽然容器已经停止了运行,但还是与镜像有所关联,所以删除不了镜像,要想删除镜像必须把与之关联的所有的容器都删除才可以,要想删除容器,必须使容器停止运行,

一行命令停止所有的容器:

docker之container eb7a144fe8ce is using its referenced image 9b9cb95443b5

 

 停止后,就可以删除容器了,

一行命令删除所有的容器:

docker之container eb7a144fe8ce is using its referenced image 9b9cb95443b5

 

 与之关联的容器都删除后,就可以删除镜像了

docker之container eb7a144fe8ce is using its referenced image 9b9cb95443b5

 

 参考自https://blog.csdn.net/silentwolfyh/article/details/52354402

 

相关文章:

  • 2022-12-23
  • 2021-05-01
  • 2021-08-28
  • 2021-07-07
  • 2021-05-05
  • 2021-07-08
猜你喜欢
  • 2022-02-04
  • 2022-03-06
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案