" command to view the logs."/> " command to view the logs.">
Home > Article > Operation and Maintenance > Where are the logs after the docker container is started?
After docker is started, the log will be in the following location
/var/lib/docker/containers/container ID/container ID-json.log
You can also use the following command to view the log:
docker logs 容器ID
Use docker-compose to record the log to a local file through configuration
The directory structure is as follows, among which the conf under mysql Place the configuration file data as the database file log as the mysql running log
##root@zssj-magic-box:/data/docker-compose# tree -L 2.For more related tutorials, please pay attention to the├── docker-compose.yml└── mysql ├── conf ├── data └── log
docker tutorial column on the PHP Chinese website.
The above is the detailed content of Where are the logs after the docker container is started?. For more information, please follow other related articles on the PHP Chinese website!