How to delete docker image

王林
Release: 2020-03-23 17:57:16
Original
12351 people have browsed it

How to delete docker image

Delete image:

docker rmi IMAGEID
Copy after login

or

docker rmi REPOSITORY:TAG
Copy after login

Extension:

Rename image:

docker tag IMAGEID  REPOSITORY:TAG
Copy after login

Container :

Rename:

docker 原容器名 新容器名
Copy after login

Delete:

docker rm CONTAINERID
Copy after login
$ docker ps // 查看所有正在运行容器 
$ docker stop containerId // containerId 是容器的ID 
$ docker ps -a // 查看所有容器 $ docker ps -a -q // 查看所有容器ID 
$ docker stop $(docker ps -a -q) //  stop停止所有容器 
$ docker rm $(docker ps -a -q) //   remove删除所有容器
Copy after login

Recommended tutorial: docker tutorial

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

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!