In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to close the container by docker". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "docker how to close the container"!
Generally, we can use docker stop to terminate a running container. In addition, the container automatically terminates when the application specified in the docker container terminates.
For example, a container with only one terminal is started, and when a user exits the terminal through the exit command or Ctrl+d, the created container terminates immediately. The container that terminates the state can be seen with the docker ps-a command.
Or use the following steps to specify how to stop the docker service.
Step 1: check the version of our operating system. Different operating system versions have different ways to stop docker services. Use lsb_release-a to check the version number. Here, take centos 6.5 as an example.
Step 2: before shutting down the docker service, we use the docker ps command to check whether there is a container running. We need to stop the container first. Stopping the service directly may cause the container exception.
Docker ps-- view the container that is running
Docker stop container ID-- stop container
Step 3: since the operating system version queried above is centos 6.5, we use service docker stop to stop the container service (/ etc/init.d/docker stop is also available)
Change the way the service starts and shuts down after centos 7. You can use the command systemctl stop docker to shut down
Step 4: check the current container service status service docker status (or / etc/init.d/docker status)
View status on systemctl status docker-centos 7
At this point, I believe you have a deeper understanding of "how to close the container by docker". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.