" 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?

Where are the logs after the docker container is started?

尚
Original
2020-04-02 14:32:406888browse

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

.

├── docker-compose.yml

└── mysql

├── conf

├── data

└── log

For more related tutorials, please pay attention to the

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!

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