Show Docker container logs for a time range
docker logs since until | docker logs between two times | show docker logs last 2 hours | docker | logs | time-rangedocker logs -t --since 2h --until 1h appFilters the container logs to a time window and prefixes each line with a timestamp via -t. --since and --until accept relative values like 30m or 2h as well as absolute times like 2026-10-09T08:00:00. The example shows everything between two hours ago and one hour ago.
Note: To search the output, filter it with 2>&1 | grep -i fehler (replace the search term as needed), since Docker passes the container’s error output on to stderr.
Also searched as
- docker logs since until
- docker logs between two times
- show docker logs last 2 hours