{"id":"be6fb139-2ee0-4465-991f-7ece00bc87ea","task":"View and follow container logs with docker logs","domain":"docs.docker.com","steps":["Show all logs for a container: `docker logs CONTAINER` (alias of docker container logs).","Show only the last N lines: `docker logs --tail 100 myapp`.","Follow/stream new output live: `docker logs -f myapp` (Ctrl-C to stop).","Show logs since a time or relative duration: `docker logs --since 42m` (or `--until 42m`); combine with -f and --tail.","Add RFC3339Nano timestamps: `docker logs -t myapp`; include extra --log-opt attributes with --details.","Official docs: https://docs.docker.com/reference/cli/docker/container/logs/"],"gotchas":["docker logs only retrieves output for the default/local json-file logging driver; with other log drivers (gelf, splunk, journald, etc.) `docker logs` returns no data.","--tail default is `all`; passing a negative or non-integer value is invalid and resets to `all`.","--since/--until accept RFC3339 timestamps OR Go durations like 1m30s / 3h.","In detached mode you often must add -d to `docker run` won't show logs; combine `docker run -d` with `docker logs -f` to watch.","--follow keeps the connection open streaming STDOUT+STDERR until Ctrl-C."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T23:37:22.758Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T23:37:22.758Z"},"url":"https://mcp.waymark.network/r/be6fb139-2ee0-4465-991f-7ece00bc87ea"}