Docker / Compose

Docker / Compose: docker compose logs -f --tail 100 — Windows

Follow recent service logs.

Availability: Third-party software; install and version dependent.中文

Syntax

docker compose logs -f --tail 100

Examples

Follow recent service logs.

docker compose logs -f --tail 100

Parameters, options and clauses

Option / clauseDescription
-f, --followContinue streaming new log output.
--tail <n|all>Show the last n lines, or all available lines.
--since <duration>Show logs since a time or relative duration.
--timestampsAdd timestamps to log lines.
[service...]Limit output to selected Compose services.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory