Do not reserve one unbounded pool for Docker logs. Set per-container rotation and maintain a separate host free-space floor. A practical starting point is 30–100MB for routine containers, with larger limits only for services whose troubleshooting window requires them.
Total space equals per-container limit multiplied by container count, plus daemon, journald, application, crash, and temporary logs. The correct reserve must also keep image pulls, updates, and container restarts working during a logging spike. This distinction sets the measurement method, safety margin, and stop condition. This distinction sets the measurement method, safety margin, and stop condition.
Build the budget from each log producer
Inventory the Docker logging driver, container count, log rate, retention window, and any application logs written inside volumes. Rotating stdout does not limit a separate log file created by the application.
For `json-file`, `max-size=10m` and `max-file=3` bounds retained files near 30MB per container. The `local` driver adds compression and bounded rotation, but existing containers may need recreation to adopt changed defaults.
Reserve additional system-disk headroom for images, writable layers, package updates, and emergency diagnostics. Do not let the log budget consume the last usable space on `/var/lib/docker`.
Alert on rate and free space, not size alone
Track bytes per container, growth per hour, rotation events, filesystem free bytes, and inode use. A sudden rate change often reveals a crash loop before the disk fills.
Set warning and critical thresholds early enough to preserve restart and update operations. For a small system disk, a fixed 5–10GB operational reserve may be more meaningful than a percentage alone.
Use the table below to turn observed behavior into a limit.
| Observed state | Verdict | Next action |
|---|---|---|
| Routine service; low log rate | 30–100MB starting cap | Tune to troubleshooting window |
| Bursty service with justified history | Larger explicit exception | Monitor growth and forwarding |
| No rotation; falling free space | Unsafe | Enable limits before normal operation |
Apply rotation without losing essential evidence
Set daemon defaults and explicit exceptions for high-value services, then recreate or redeploy containers so the settings take effect. Confirm the active driver and options with container inspection.
Forward security or audit logs to a separate durable destination if they must outlive local rotation. Routine debug output should not be retained indefinitely on the system disk.
ZimaSpace’s Docker disk-growth workflow separates logs from layers and volumes.
RunBook Academy’s log-rotation analysis shows how `max-size` and `max-file` create a predictable ceiling.
Force a noisy-container validation
Generate controlled log output in a test container and watch files rotate. Confirm old files disappear at the configured count and the container continues running.
Restart Docker and the host, then repeat the check. Verify alerts fire before the operational reserve is consumed and that application logs outside the driver are separately bounded.
Proceed when worst-case aggregate logs fit inside the budget and rotation survives restart. Stop and fix the configuration if one container grows without bound, rotation is not active, or free space falls below the system reserve.
Support & Tips
More to Read

How to Keep Adult Videos on Your NAS Hidden from Family Members
Keep adult videos private on a family NAS. Check folder permissions, Plex and Jellyfin library access, thumbnails, watch history, shared TV logins and DLNA.

What to Check Before Loading a Community Model in Transformers
Use the Transformers Jinja sandbox update to review model provenance, chat templates, remote code, serialized weights, and isolated first runs.

Run Mirage Locally: OCR and Object Detection from One Image
Try Cactus Compute’s small local vision model, validate OCR and object extraction on real inputs, and understand memory, language, and privacy limits.



