liveBook · Manning

Docker system df

As explained in Learn Docker in a Month of Lunches, Second Edition

docker system df is a Docker CLI command that reports disk-space usage by Docker objects, including images and their shared layers.

docker system df reports the disk space Docker is physically using. It helps distinguish an image’s logical size from its actual storage cost when images share read-only layers. section 3.4 section 17.1

Use the command to:

  • Check storage used by images, containers, volumes, and the build cache. section 17.1
  • Compare logical image totals with actual disk usage after shared layers are reused. section 3.4
  • Find accumulated old image layers before deciding whether cleanup is needed. section 17.1

Check Docker storage

Run `docker system df` after pulling or rebuilding images. A logical image total of 558.23 MB can correspond to 223.6 MB of actual image-cache usage when layers are shared, saving 334 MB. section 3.4

docker system df

Open the command listing to inspect the storage-reporting workflow. section 17.1

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains logical versus physical image size and names storage categories, but stops short of detailed output-field interpretation.
Examples
Uses shared base layers, a 558.23 MB logical total, 223.6 MB physical usage, and accumulated unused images as examples.
What it assumes
Assumes basic familiarity with Docker images and layers while clarifying shared storage from the beginning.
What you can do after
Diagnose Docker disk consumption and identify when old image layers or build-cache data warrant cleanup.
How it connects
Connects image layers, Docker images, containers, volumes, build cache, Dockerfiles, and docker system prune.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.