Docker logs 命令

发布于 2022-07-18 14:00:35 更新于 2022-07-18 14:00:35

作用

logs 命令用于批量打印容器中进程的运行日志。

用法

Usage: docker logs [OPTIONS] CONTAINER

Fetch the logs of a container

-f, --follow=false        Follow log output
--help=false              Print usage
--since=                  Show logs since timestamp
-t, --timestamps=false    Show timestamps
--tail=all                Number of lines to show from the end of the logs

示例

$ sudo docker logs 60095325e584