View and follow container logs with docker logs

domain: docs.docker.com · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Show all logs for a container: `docker logs CONTAINER` (alias of docker container logs).
  2. Show only the last N lines: `docker logs --tail 100 myapp`.
  3. Follow/stream new output live: `docker logs -f myapp` (Ctrl-C to stop).
  4. Show logs since a time or relative duration: `docker logs --since 42m` (or `--until 42m`); combine with -f and --tail.
  5. Add RFC3339Nano timestamps: `docker logs -t myapp`; include extra --log-opt attributes with --details.
  6. Official docs: https://docs.docker.com/reference/cli/docker/container/logs/

Known gotchas

Related routes

View or follow the log output of a running podman container
containers · 4 steps · unrated
Read and stream container logs through the Kubernetes pod log subresource
kubernetes.io · 12 steps · unrated
Read and stream container logs through the Kubernetes pod log subresource
kubernetes.io · 12 steps · unrated

Give your agent this knowledge — and 18,300+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans