Docker容器批量停止和删除

[root@localhost ~]# docker ps -a
[root@localhost ~]# docker ps -a | awk '{print $1}'
[root@localhost ~]# docker ps -a | awk '{print $1}'|xargs docker stop
[root@localhost ~]# docker ps -a
[root@localhost ~]# docker ps -a | awk '{print $1}'|xargs docker rm
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost ~]# 


Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐