Web Server Rescue
Read-only, can be slowRead Recent Container Logs
A container is failing and full logs are too large or too noisy.
Command
docker logs --since 10m --tail 100 api
Before you run this
System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.
When not to use it: Do not paste raw logs into public channels without reviewing them for secrets or user data.
Expected output
The last 100 log lines from the previous 10 minutes.
System impact
Read-only, can be slow. Nothing changes locally. Docker reads recent log output for one container.
Scope this to the smallest useful path or service on busy systems.
Recovery / rollback: no state is changed.
When to use it
Use when checking recent crashes, startup errors, HTTP failures, or deployment regressions.
When not to use it
Do not paste raw logs into public channels without reviewing them for secrets or user data.
Sensitive output warning
Container logs can include tokens, URLs, user data, and internal hostnames. Redact before sharing.
docker logs --since 10m --tail 100 api
next steps
Related commands
Read Recent Docker Container Logs
Recent container logs usually show the failing command or dependency.
docker logs --tail 80 container_name
Show Published Container Ports
When a service is unreachable, confirm Docker is publishing the port you think it is.
docker port web
Inspect Release Disk Usage
Disk pressure during deploys often starts in old release directories.
du -sh releases/* 2>/dev/null | sort -h | tail -10
Find Restarting Containers Fast
Restart loops hide in plain sight unless you filter for them.
docker ps -a --filter status=restarting --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}'
Check Filesystem Space with df
A full disk can break logins, uploads, databases, and deploys.
df -h
next diagnostic step
Where to go from this command
- Docker disk full hub Use when a noisy container log contributes to disk pressure.
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.