How to check the status of a container in Docker?
To check the status of a Docker container, you can use the following command:
- View all containers that are currently running.
docker ps
- View all containers, including those that are stopped.
docker ps -a
- View the status of a specific container:
docker inspect <容器ID或名称>
- Check the logs of the container.
docker logs <容器ID或名称>
- View the running processes inside the container:
docker top <容器ID或名称>
With the above commands, you can easily view the status information of Docker containers.