首页 > 其他 > 详细

Docker 快速删除所有容器

时间:2021-05-26 09:36:18      阅读:34      评论:0      收藏:0      [点我收藏+]

查看运行容器:

[root@muze1 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9180d1c09867 cloudquery.tencentcloudcr.com/cloudquery/community_flink:1.11.2-scala_2.11 "/docker-entrypoint.…" 2 months ago Up 12 days 6123/tcp, 8081/tcp cloudquery-taskmanager
3aff8757ffa8 cloudquery.tencentcloudcr.com/cloudquery/community_flink:1.11.2-scala_2.11 "/docker-entrypoint.…" 2 months ago Up 12 days 6123/tcp, 0.0.0.0:8081->8081/tcp cloudquery-jobmanager
c4da7df0f278 cloudquery.tencentcloudcr.com/cloudquery/community_kafka:2.12-2.5.0 "start-kafka.sh" 2 months ago Up 12 days 0.0.0.0:9094->9094/tcp cloudquery-kafka
65a20a633069 cloudquery.tencentcloudcr.com/cloudquery/community_zk:latest "/docker-entrypoint.…" 2 months ago Up 12 days 2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp, 8080/tcp cloudquery-zookeeper
a23a786084ac cloudquery.tencentcloudcr.com/cloudquery/community_redis:5.0.0 "docker-entrypoint.s…" 2 months ago Up 12 days 0.0.0.0:6379->6379/tcp cloudquery-redis
770e99f3206c cloudquery.tencentcloudcr.com/cloudquery/community_postgres:v1.3.0.2020121877 "cqpg_entry.sh postg…" 2 months ago Up 12 days 0.0.0.0:5432->5432/tcp cloudquery-postgreSQL

[root@muze1 ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2021-05-13 23:09:17 CST; 1 weeks 5 days ago
Docs: https://docs.docker.com
Main PID: 1317 (dockerd)
Tasks: 266
Memory: 129.4M
CGroup: /system.slice/docker.service

停用全部运行中的容器:

[root@muze1 ~]# docker stop $(docker ps -q)
技术分享图片

删除全部容器:

[root@muze1 ~]# docker rm $(docker ps -aq)

技术分享图片

 

Docker 快速删除所有容器

原文:https://www.cnblogs.com/vzhangxk/p/14811472.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!