如何将 --since 选项与 docker logs 命令一起使用
How to use --since option with docker logs command
我想使用 docker logs --since
选项查看 docker 容器日志的最后 1 小时。我应该为 --since
参数提供哪个值?
请参考Docker docs.
docker logs --since 1h
The --since option shows only the container logs generated after a given date. You can specify the date as an RFC 3339 date, a UNIX timestamp, or a Go duration string (e.g. 1m30s, 3h). Besides RFC3339 date format you may also use RFC3339Nano, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00, and 2006-01-02.
如帮助所说
--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes
我愿意
docker logs mycontainer_or_id --since 60m
根据我的活动容器,此语法是正确的
我想使用 docker logs --since
选项查看 docker 容器日志的最后 1 小时。我应该为 --since
参数提供哪个值?
请参考Docker docs.
docker logs --since 1h
The --since option shows only the container logs generated after a given date. You can specify the date as an RFC 3339 date, a UNIX timestamp, or a Go duration string (e.g. 1m30s, 3h). Besides RFC3339 date format you may also use RFC3339Nano, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00, and 2006-01-02.
如帮助所说
--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes
我愿意
docker logs mycontainer_or_id --since 60m
根据我的活动容器,此语法是正确的