Tail docker logs to see recent records not all

0 votes

In Linux, the Coreutils tail programme has a -f option that allows you to follow a log file from its present location (it does not go to the very beginning of the file and display everything).

Is this functionality available in Docker logs without having to wait for the log to be traversed in its entirety?

I've attempted:

docker logs --since 1m somecontainer

and

docker logs -f --since 1m somecontainer

It looks that it examines the whole log file (which can take a long time) before beginning to echo to the screen when it reaches the time window you choose.

Is there a method to start tailing right now, without having to wait? Is it preferable if I always log out to an external file and use the Coreutils tail command to follow it?

Apr 29, 2022 in Docker by Abhijeet
• 180 points

edited 4 days ago 4 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP