Hosting Operations
Read-onlySummarize Docker Disk Usage
The host disk is full and you need a safe storage summary before cleanup.
Command
docker system df -v
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not treat reclaimable space as safe to delete until you verify ownership and backups.
Expected output
A Docker disk usage summary with reclaimable space estimates.
System impact
Read-only. Nothing changes. Docker reads storage accounting data.
Recovery / rollback: no state is changed.
When to use it
Use before cleanup decisions to understand whether images, containers, volumes, or build cache are responsible.
When not to use it
Do not treat reclaimable space as safe to delete until you verify ownership and backups.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ docker system df -v
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 8 3 2.8GB 1.1GB (39%)
Containers 5 2 240MB 180MB (75%)
Local Volumes 4 3 1.7GB 200MB (11%)
Build Cache 12 0 620MB 620MB
$ docker volume ls
DRIVER VOLUME NAME
local app_postgres_data
local app_uploads
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
docker system df -vdocker volume ls
next steps
Related commands
Check Bytes and Inodes Before Cleanup
No space left can mean full bytes, full inodes, or both.
df -h /lab/disk-inode-cleanup && df -ih /lab/disk-inode-cleanup
Check Inodes When Disk Space Looks Fine
Sometimes the disk has free bytes but still cannot create files.
df -ih
Check Container Health Status
Docker may say a container is running while its health check says otherwise.
docker inspect --format '{{.Name}} health={{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}} status={{.State.Status}}' web
Show Containers in a Clean Triage Table
Turn noisy docker ps output into the few fields operators scan first.
docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}\t{{.Ports}}'
Snapshot Container CPU and Memory
Get Docker resource usage once, without leaving a live dashboard running.
docker stats --no-stream --format 'table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}'
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.
Useful for
- LPIC-1 style command-line practice
- LFCS style performance tasks
- Linux+ style troubleshooting review
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.