Docker Disk Full: Find the Growing Store
Identify whether Docker disk growth comes from logs, images, build cache or persistent data before choosing a targeted retention policy.
The essentials
- Docker storage includes more than your database.
- Container logs, image layers, build cache, writable layers and named volumes can all grow independently.
On this page
Docker storage includes more than your database. Container logs, image layers, build cache, writable layers and named volumes can all grow independently. Attribute the space before deleting anything.
Build a storage inventory
Record free space on the filesystem that actually holds Docker data. On Docker Desktop, the host disk and the Linux VM's storage view may differ.
Inspect Docker's storage summary and the relevant containers' logging configuration. Then identify large application-owned stores such as downloaded models and uploaded documents.
| Store | Typical question |
|---|---|
| Logs | Is rotation configured? |
| Images | Which versions remain needed for rollback? |
| Build cache | Is retention bounded? |
| Volumes | Which application owns this data? |
| Writable layer | Is the app writing outside its intended volume? |
“Unused” is a technical lifecycle state, not a guarantee that the contents are disposable.
Check log growth
Docker's logging-driver guide explains that the default json-file behavior can grow without rotation unless configured, while other configurations provide rotation. It also notes that changing defaults does not automatically reconfigure existing containers.
Inspect the actual running container. An edited daemon setting may not describe it.
If a log is growing rapidly, inspect why. A repeated connection error or debug trace can fill storage faster than an ordinary retention policy anticipates. Fix the noisy failure as well as the retention setting.
Preserve important data before cleanup
Identify every volume by owner and purpose. For databases, use their supported backup process and verify recovery before destructive cleanup. Do not solve disk pressure with a broad prune command copied from a tutorial.
For build cache and old images, review the rollback and rebuild costs before removal. Keep the operation scoped to resources you have identified.
If the disk is critically full, stop the source of uncontrolled growth where practical and preserve enough diagnostic information to explain it.
Set a sustainable policy
Choose bounded log retention, intentional image retention and a separate backup destination. Monitor the growth rate, not just the current free-space percentage.
For a model server, distinguish installed model assets from runtime memory. Deleting one container may not remove a shared model volume, and removing the wrong volume can require large downloads or lose chat data.
Verify the trend
After applying the policy and recreating affected containers when required, inspect the effective configuration. Observe storage over a representative workload period.
Success means storage growth is understood and bounded without losing needed data. The local AI setup guide provides the application context; this storage inventory makes its operational footprint visible.
Related troubleshooting
This guide draws on the linked documentation. Examples are illustrative unless explicitly identified as measured results.
Practical guides published by Lucivo, developed with AI assistance and references to official documentation. Examples are illustrative unless a guide explicitly documents a hands-on test. Check the linked sources for current product details.
Related articles
AI Streaming Arrives All at Once Behind NGINX
API Key Committed to Git: What to Do Next
API Timeout: Is It Safe to Retry?
The Weekly Breakdown
High signal AI & software stories.
Direct to your inbox. No hype.
Independent analysis of AI models, developer tools, and computing architectures. Delivered every Sunday morning. 100% free.