Volume Drivers and Plugins
What you'll learn: How Docker volume drivers extend storage capabilities to work with advanced backends like NFS, cloud storage, and distributed filesystems.
The Core Idea
By default, Docker volumes are stored locally on the host filesystem using the local driver. But what if you need your data on network-attached storage (NAS), in AWS S3, or on a distributed filesystem like GlusterFS? That's where volume drivers come in.
Volume drivers are pluggable components that let Docker talk to different storage systems. Think of them as adapters: just as you might use different adapters to plug your laptop into various monitors, volume drivers let Docker "plug into" different storage backends.
How Volume Drivers Work
When you create a volume, Docker uses a driver to handle the actual storage operations:
localdriver (default): Stores data on the host machine- Third-party drivers: Connect to external storage systems
The Docker daemon communicates with the driver through a standard plugin API, hiding the complexity from your containers. Your container still uses the same mount commands—Docker and the driver handle the backend magic.
Common Volume Driver Examples
- NFS/SMB drivers: Mount network file shares
- Cloud storage drivers: Connect to AWS EBS, Azure Disk, Google Persistent Disk
- Distributed filesystems: GlusterFS, Ceph, Convoy
- Specialized storage: NetApp, Pure Storage, Dell EMC plugins
Why Use Volume Drivers?
Volume drivers enable persistent, shared, and portable storage across container hosts—essential for production deployments where containers may move between machines but need access to the same data.
Key Takeaway: Volume drivers extend Docker's storage capabilities by allowing containers to use advanced storage backends (NFS, cloud storage, distributed systems) instead of just local disk, enabling shared and persistent data across hosts.