docker_practice/image/rmi.md

12 lines
526 B
Markdown
Raw Normal View History

2014-09-15 17:08:06 +08:00
##移除本地镜像
2014-09-15 21:28:09 +08:00
如果要移除本地的镜像,可以使用`docker rmi`命令。注意`docker rm`命令是移除容器。
2014-09-05 15:50:31 +08:00
```
$ sudo docker rmi training/sinatra
Untagged: training/sinatra:latest
Deleted: 5bc342fa0b91cabf65246837015197eecfa24b2213ed6a51a8974ae250fedd8d
Deleted: ed0fffdcdae5eb2c3a55549857a8be7fc8bc4241fb19ad714364cbfd7a56b22f
Deleted: 5c58979d73ae448df5af1d8142436d81116187a7633082650549c52c3a2418f0
```
2014-09-15 21:28:09 +08:00
*注意:在删除镜像之前要先用`docker rm`删掉依赖于这个镜像的所有容器。