Skip to main content

Diagnose Container Storage Size

Overview

Docker storage reporting can be confusing if you mix container writable layer, image size, and volume data.

Key Concepts

  • SIZE: writable layer growth per container
  • VIRTUAL SIZE: image size plus writable layer
  • volumes are outside container writable layer accounting

Commands

docker ps -s
docker system df
docker system df -v
docker container inspect <container> --format='{{.SizeRw}}'
docker container inspect <container> --format='{{.SizeRootFs}}'

Common Misunderstanding

Large virtual size does not mean duplicated image bytes per container. Shared image layers are stored once.