Linux服务器Docker卸载某个镜像:
首先输入命令docker images查看当前docker下有多少镜像:
1 [root@iZwz9a191mdam4di3dozk3Z ~]# docker images2 REPOSITORY TAG IMAGE ID CREATED SIZE3 mysql 5.6 a46c2a2722b9 4 days ago 256MB4 hello-world latest 4ab4c602aa5e 7 weeks ago 1.84kB5 morunchang/fastdfs latest a729ac95698a 2 years ago 460MB
View Code
如上所示可以看到当前docker下有3个镜像:mysql、hello-world、morunchang/fastdfs,现在我们假设要删除hello-world这个镜像,使用如下流程以及命令:
使用命令docker ps -a查看当前运行下的镜像进程:
1 [root@iZwz9a191mdam4di3dozk3Z ~]# docker ps -a2 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES3 e061047acf6e mysql:5.6 "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:3306->3306/tcp mysqlserver4 61c7a4d6363d m