Docker has two ways of storing images: the classic overlay2 storage driver and the newer containerd image store. Docker 29 defaults to the containerd image store. Where your images physically live depends on which one you’re using, so check that first.
1. Check which image store Docker is using
- If the output starts with
overlayfsand includesio.containerd.snapshotter.v1, you are using the containerd image store. - If the output starts with
overlay2(orbtrfs,zfs), you are using the classic storage driver.
2. Find where Docker stores its data
Docker’s own state (containers, volumes, networks) lives in its data root:/var/lib/docker.
If you are using the classic storage driver (overlay2), images also live under this directory, and this is the only location you need to care about.
If you are using the containerd image store, image layers are stored by containerd, not under Docker’s data root. Find containerd’s root with:
/var/lib/containerd.
3. Check which disk and how much space
Filesystem and Mounted on columns tell you which disk each directory is on.
4. Move Docker storage to another disk (optional)
Rather than copying existing data to the new disk, this procedure removes all images and containers and starts Docker fresh in the new location. Jobs will re-pull whatever images they need. 4.1 Remove all images, containers, and volumes:/mnt/data):
/etc/docker/daemon.json and add the data-root key at the top level):
/etc/containerd/config.toml and set root at the top of the file:
If you are on the classic storage driver (overlay2) this step is optional, but doing it now means you won’t need to revisit it if you switch stores later.
ubuntu image counted against the new disk.