Home > Operation and Maintenance > Docker > How to delete none image in docker

How to delete none image in docker

王林
Release: 2020-11-20 16:29:33
forward
10304 people have browsed it

How to delete none image in docker

思路:

如果要删除镜像中的容器,那么先要删除镜像中的容器,而要删除镜像中的容器,则必须先停止容器。

具体步骤:

$ docker images
$ docker rmi $(docker images | grep "none" | awk '{print $3}')
Copy after login

直接删除带none的镜像,直接报错了。提示先停止容器。

$ docker stop $(docker ps -a | grep "Exited" | awk '{print $1 }') //停止容器
$ docker rm $(docker ps -a | grep "Exited" | awk '{print $1 }') //删除容器
$ docker rmi $(docker images | grep "none" | awk '{print $3}') //删除镜像
Copy after login

相关推荐:docker教程

The above is the detailed content of How to delete none image in docker. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
About docker
From 1970-01-01 08:00:00
0
0
0
docker install phpstudy
From 1970-01-01 08:00:00
0
0
0
Deploy snmp environment in docker
From 1970-01-01 08:00:00
0
0
0
docker: invalid reference format
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template