如何删除Docker中的图像?

岁酱吖の 提交于 2020-10-16 06:10:18

问题:

I'm running Docker under Vagrant under OS X 10.8.4 (Mountain Lion), and whenever I try to delete a saved image, I get an error: 我在OS X 10.8.4(Mountain Lion)下在Vagrant下运行Docker,每当我尝试删除已保存的图像时,我都会收到错误消息:

$ docker rmi some-image-id
2013/07/15 hh:mm:ss unexpected JSON input

According to the rmi help, the proper syntax is docker rmi IMAGE [IMAGE...] , and I'm not sure what to make of that. 根据rmi帮助,正确的语法是docker rmi IMAGE [IMAGE...] ,我不知道该怎么做。

How can I delete an image? 如何删除图像?

$ docker version
Client version: 0.4.8
Server version: 0.4.8
Go version: go1.1

$docker info
Containers: 1
Images: 3

Interestingly, when I run docker ps , no containers show up at all. 有趣的是,当我运行docker ps ,根本没有容器出现。 Running docker images shows four (4) base images and one (1) node image. 运行docker images显示四(4)个base图像和一(1)个node图像。


解决方案:

参考一: https://stackoom.com/question/1C7Xv/如何删除Docker中的图像
参考二: https://oldbug.net/q/1C7Xv/How-does-one-remove-an-image-in-Docker
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!