How to use --since option with docker logs command

kgs picture kgs · Jun 8, 2017 · Viewed 21.6k times · Source

I want to look at last 1 hour of docker container log using docker logs --since option. Which value I should provide for --since parameter?

Answer

user2915097 picture user2915097 · Jun 8, 2017

as the help says

--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes

I would do

docker logs mycontainer_or_id --since 60m

This syntax is correct according to my active container