Home >Operation and Maintenance >Docker >What command should I enter to exit docker?

What command should I enter to exit docker?

WBOY
WBOYOriginal
2021-12-30 16:08:4317421browse

The command to exit docker is "service docker stop" or "systemctl stop docker"; the "docker stop" command is used to exit a running container, and the "stop docker" command is used to exit the docker service.

What command should I enter to exit docker?

The operating environment of this tutorial: linux7.3 system, docker-1.13.1 version, Dell G3 computer.

What command should I enter to exit docker?

Step 1: Check the version of our operating system. The method of stopping the docker service varies with different operating system versions. Similarly, use lsb_release -a to check the version number. This machine is centos 6.5

What command should I enter to exit docker?

Step 2: Before closing the docker service, we use the docker ps command to check whether there are currently containers. It is running. You need to stop the container first. Stopping the service directly may cause container exceptions. As shown in the figure, we stopped the running container

docker ps----View the running container

docker stop container ID----stop container

What command should I enter to exit docker?

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 can also be used)

After centos 7, to change the startup and shutdown method of the service, you can use the command systemctl stop docker to shut down

What command should I enter to exit docker?

Step 4 : Check the current container service status service docker status (or /etc/init.d/docker status)

systemctl status docker---check the status on centos 7

What command should I enter to exit docker?

Recommended learning: "docker video tutorial"

The above is the detailed content of What command should I enter to exit docker?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn