Docker logs 命令
Last updated
Last updated
docker logs -f my_containerhello world
hello world
hello world
...docker logs -t my_container2023-07-22T15:04:05.123456789Z hello world
2023-07-22T15:04:06.123456789Z hello world
2023-07-22T15:04:07.123456789Z hello world
...# 显示 2023-07-22T15:00:00 之后的日志。
docker logs --since="2023-07-22T15:00:00" my_container# 显示 my_container 的最后 10 行日志。
docker logs --tail 10 my_container# 显示 my_container 的日志,并包含额外详细信息。
docker logs --details my_container# 显示 2023-07-22T16:00:00 之前的日志。
docker logs --until="2023-07-22T16:00:00" my_container