2.3.3.5 Storage Driver Role
A focused guide to Storage Driver Role, connecting core concepts with practical Docker and container operations.
The storage driver role is to implement the actual mechanics of layering, combining, and managing image and container filesystems on a given host, translating Docker's abstract concept of "layers" into concrete operations on the host's actual filesystem and kernel features.
Why a Pluggable Storage Driver Exists
Different hosts may have different filesystems and kernel capabilities available, so Docker abstracts the specific mechanism used to implement layering behind a storage driver interface, allowing the most appropriate implementation to be used for a given environment.
docker info --format '{{.Driver}}'
This reports which storage driver is currently active on a given Docker installation — overlay2 is the most common default on modern Linux systems.
overlay2: The Common Default
The overlay2 driver uses the Linux kernel's built-in overlay filesystem to implement layering directly, combining multiple lower, read-only directories with a single upper, writable directory into one merged view.
mount | grep overlay
Run on the host, this reveals the actual overlay filesystem mounts backing each running container, showing the lower and upper directories the kernel is combining for that specific container.
Alternative Storage Drivers
Other storage drivers exist for situations where overlay filesystem support is unavailable or unsuitable, each implementing the same conceptual layering model through different underlying mechanisms, with different performance characteristics.
dockerd --storage-driver=devicemapper
Specifying an alternative driver like this changes how layering is implemented on disk, without changing how layers behave conceptually from the perspective of someone building or running images.
Storage Driver Choice and Performance
Different storage drivers have different performance characteristics, particularly for write-heavy workloads or for operations involving very large files, which is occasionally a relevant consideration when choosing or troubleshooting a host's Docker configuration.
docker run --rm myapp:1.0 dd if=/dev/zero of=/tmp/testfile bs=1M count=100
Why the Storage Driver's Role Matters
Although most users never need to think about which storage driver is active, understanding that this is a pluggable, host-specific implementation detail clarifies why certain layering behaviors or performance characteristics can differ between Docker installations running on different operating systems or kernel versions.