docker logs -f --tail=300
时间: 2023-11-17 17:16:07 浏览: 105
docker commands log
可以使用以下命令来查看最近的日志,并保持连接以实时查看新的日志输出:
docker logs -f --tail=300 CONTAINER_ID
这里的`CONTAINER_ID`是你要查看日志的容器的标识符。该命令将显示容器的最近300行日志,并会持续显示新的日志输出。你可以根据需要调整`--tail`参数来显示不同数量的日志行数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [docker 查看容器启动日志 查看运行日志](https://blog.csdn.net/plqwf19880902/article/details/122834774)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [docker学习 (一)快速安装单机版redis以及问题处理](https://blog.csdn.net/qq_34605063/article/details/126543737)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文