In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about how to delete all containers in docker. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.
View running containers
# docker ps-q9b9f97905e36
Deactivate all running containers
# docker stop $(docker ps-Q) 9b9f97905e36
Delete all containers
# docker rm $(docker ps-aq) 9b9f97905e36ce255ba7637ef126bad55cacc10a4c3541f51949036422c3518abb0ea7068e44bd1abf81df01fe711d000931fac899301e16b5a972af15c0cb22672e241a780f8634
One command to deactivate and delete the container
Root@ThinkPad:/home/jiqing# docker run-d-p 9000 usr/local/bin/start.sh0a9d3b5e5f957cc87abc396486abd07e325f5c70f46f0149e22efb5e0a4f8a24root@ThinkPad:/home/jiqing# docker ps 80 jiqing9006/centos:httpd / bin/sh-c / usr/local/bin/start.sh0a9d3b5e5f957cc87abc396486abd07e325f5c70f46f0149e22efb5e0a4f8a24root@ThinkPad:/home/jiqing# docker ps-aq0a9d3b5e5f95root@ThinkPad:/home/jiqing# docker stop $(docker ps-Q) & & docker rm $(docker ps-aq) 0a9d3b5e5f950a9d3b5e5f95
Delete containers that are not running
# docker container pruneWARNING! This will remove all stopped containers.Are you sure you want to continue? [y/N] yDeleted Containers:38fcd72cc70b07c2ca991e4f7681d192c24f9e89c96f48f9a1505cb736beecc7Total reclaimed space: 0B
Delete all mirrors (proceed with caution)
# docker rmi $(docker images-Q)
The above is how to delete all containers in docker. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.