docker logs命令-获取容器的日志

logs 获取容器的日志

Usage: docker logs CONTAINER

Fetch the logs of a container

-f,--follow=falseFollow log output
-t,--timestamps=falseShow timestamps
--tail="all"Output the specified number of lines at the end of logs (defaults to all logs)

The docker logs 显示所有的容器中terminal输出

The docker logs --follow command will continue streaming the new output from the container'sSTDOUT and STDERR.

Passing a negative number or a non-integer to --tail is invalid and the value is set to all in that case. This behavior may change in the future.