Volume Plugin

With Docker Volume Plugins we can enable container to access external storage natively. Currently plugins are available only on experimental release. There are few existing volume plug-ins like Blockbridge Plugin, Flocker, GlusterFS.

In this demo we would use GlusterFS plugin with Docker experimental release. We would configure Gluster volume in one VM and using the Docker plugin, we would attach that volume to a container running to different machine.

vagrant ssh labvm-1
sudo -s
iptables -F
systemctl start glusterd
mkdir -p /mnt/brick
gluster volume create dockervol force
gluster volume start dockervol 
vagrant ssh labvm-2
sudo -s
iptables -F
mkdir /tmp/vol
mount -t glusterfs /tmp/vol
export GOPATH=/root/code
/root/code/bin/docker-volume-glusterfs -servers &
systemctl stop docker
./docker-latest daemon  > /dev/null 2>&1  &
./docker-latest  run -it  --volume-driver glusterfs --volume dockervol:/data centos
touch  /data/file