In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the skills of using the docker command, the article is very detailed, has a certain reference value, interested friends must read it!
Intro
Introduce and include some simple and practical but seldom used docker commands that may be used.
Dangling images
When build's own docker image is used, it is sometimes encountered to use one or more middle-tier images, which reduces the size of the final packaged docker image to a certain extent, but produces some useless images whose tag is none, also known as hanging image (dangling images).
List all dangling images:
Docker images-f "dangling=true"
Delete all dangling images:
Docker rmi $(docker images-f "dangling=true"-Q)
Batch operation
When the server restarts or shuts down for some reason, the docker container may need to be fully restarted, starting all docker containers
Note: if there are dependencies, such as link, you should start these dependent containers first.
Docker start $(docker ps-aq)
Stop all docker containers
Docker stop $(docker ps-aq)
Delete all docker containers
Docker rm $(docker ps-aq)
Delete all docker mirrors
Docker rmi $(docker images-Q)
Docker Resource cleanup
Docker container prune # Delete all exited containers docker volume prune # Delete unused volumes docker image prune # Delete dangling or all unused mirrored docker system prune # Delete stopped containers, dangling images, network not referenced by containers and cache# during construction for security reasons, this command does not delete volumes that are not referenced by any container by default, if you need to delete them at the same time You need to specify explicitly-- volumns parameter docker system prune-- all-- force-- volumns # this time not only will the data volume be deleted, but there will be no confirmation process! Note that using the-- all parameter will delete all unreferenced images, not just dangling images. All of the above is "what are the tips for using the docker command?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to 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.