Home  >  Article  >  Operation and Maintenance  >  How to view docker container logs in real time

How to view docker container logs in real time

王林
王林forward
2020-09-15 17:52:133172browse

How to view docker container logs in real time

View docker container logs in real time

(Recommended tutorial: docker tutorial)

$ sudo docker logs -f -t --tail 行数 容器名

Example: View docker container name in real time Log for the last 10 lines of s12

$ sudo docker logs -f -t --tail 10 s12

The above is the detailed content of How to view docker container logs in real time. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete