1. Check the container status:
docker stats nginx1
2. Check the process information:
docker top nginx1
Use docker inspect to view the underlying information of Docker. It will return a JSON file recording the configuration and status information of the Docker container
Default directory of the docker container:
/var/lib/docker/containers目录下 12 位开头的 就是 容器ID inspect 内容就是 config.v2.json 文件 cat/var/lib/docker/containers/23defb07e362b81fa9d282382dfb5101e7a269f97b3d167493a5b1e031d15120/config.v2.json
inspect View the configuration information of the container, including container name, environment variables, and running commands , host configuration, network configuration and data volume configuration.
3. View all status of the container:
docker inspect nginx1
root@rbtnode1: ~# docker inspect --format='{{.NetworkSettings.IPAddress}}' nginx1 172.16.57.5 root@rbtnode1: ~# docker inspect --format '{{.Name}} {{.State.Running}}' nginx1 /nginx1 true
Recommended tutorial:docker tutorial
The above is the detailed content of How to check container service status in docker. For more information, please follow other related articles on the PHP Chinese website!