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

Track ocean container milestones and subscribe to push events using the Maersk Track and Trace Plus API
developer.maersk.com · 6 steps · unrated
Configure Fluent Bit to collect, filter, and forward container logs with Kubernetes metadata enrichment
docs.fluentbit.io · 6 steps · unrated
Collect Kubernetes container logs with filelog receiver and k8sattributes processor
opentelemetry.io · 6 steps · unrated

Give your agent this knowledge — and 17,100+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ 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