Volume Driver Plugins In Docker
- Storage drivers help manage storage on images and containers.
- If want to persist storage, need to create volumes.
- Volumes are not handled by storage drivers.
- Volumes are handled by
Volume Driverplugins. - Default plugin is
Local- Helps create a volume on the
dockerhost.- Stores data under
/var/lib/docker/volumesdirectory.
- Stores data under
- Helps create a volume on the
- Other volume drivers include:
Azure File Storage,Convoy,DigitalOcean Block Storage,Flocker,gce-docker,GlusterFS,NetApp,RexRay,Portworx,VMware vSphere Storage
RexRaystorage driver can help to provision on AWS EBS, S3, EMC storage arrays (Isilon and ScaleIO), Google Persistent Disk or OpenStack Cinder,- When running a
dockercontainer, can choose a specific volume driver as in the below example:docker run -it --name mysql --volume-driver rexray/ebs --mount src=ebs-vol,target=/var/lib/mysql mysql - The above provisions a volume from Amazon EBS.
- When the container exists, the data is still safe in the cloud.