In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "summary of common commands in docker container". In daily operation, I believe many people have doubts about the summary of common commands in docker container. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "summary of common commands in docker container". Next, please follow the editor to study!
Mirror command
Docker images looks at the image of this machine.
Docker rmi deletes the local image, and adds a parameter-f to force deletion, because sometimes it cannot be deleted if there is a running container, such as docker rmi-f nginx forcibly stop the container and delete the image, regardless of whether it is occupied or not.
Docker search searches for mirrors in the remote repository based on their names. You can take a look at all the mirrors with relevant names. You can choose which mirror we want to pull. The following is a search for nignx-related images. The red part ok indicates that it is an official image.
Docker pull: [tag name]: pull the image. By default, the tag name is not written and the latest image is pulled.
Docker push pushes the image, and when we make our own image, we can push it to our own docker hub.
Container command
With an image, we can new a mirror instance, which is what we call a container.
Docker run: run a container based on a certain image. If there is a local image, it will be created based on the local image. If not, pull a mirror remotely and then create it.
Docker ps shows the container that is running. Add a parameter-a to see the container in the stop.
Docker stop stop Container
Docker kill Force stop Container
Docker restart restart the container
Docker rm deletes the container. After deletion, the container is gone and cannot be restarted or stopped.
Docker inspect to view container details
At this point, the study on "summary of common commands in docker containers" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.