docker volume


原文链接: docker volume

docker plugin install --grant-all-permissions store/weaveworks/net-plugin:latest_release
docker plugin install --grant-all-permissions --alias vsphere vmware/docker-volume-vsphere:latest
docker plugin install --grant-all-permissions --alias kahuna shivanshug/vsphere-shared:kahuna-mount1
docker plugin install --grant-all-permissions --alias netapp netapp/ndvp-plugin:17.07
docker plugin install riyaz/authz-no-volume-plugin

dockerd --authorization-plugin=riyaz/authz-no-volume-plugin:latest

curl -sSL https://dl.bintray.com/emccode/rexray/install | sh -

google cloud engine drive

docker plugin install rexray/gcepd:latest GCEPD_TAG=rexray GCEPD_ZONE=us-east4-a GCEPD_DEFAULTDISKTYPE=pd-standard

sshfs

https://github.com/vieux/docker-volume-sshfs/blob/master/main.go

sshfs root@l14:/home/tecmint/ /mnt/tecmint fuse.sshfs defaults 0 0

Docker volume plugin for sshFS

准备工作:必备工作
yum install sshfs
mkdir /docker/sshfs/

  1. 安装 vieux/sshfs 作为卷驱动

docker plugin install --grant-all-permissions vieux/sshfs

  1. 创建 volume

docker volume create -d vieux/sshfs -o sshcmd= [-o IdentityFile=/root/.ssh/] [-o port=] [-o ] sshfs

$ docker volume create -d vieux/sshfs -o sshcmd=root@l14:/docker/sshfs -o allow_other -o password=lzkp2018 sshfs

  1. 使用 volume

docker plugin install --grant-all-permissions vieux/sshfs sshkey.source=/root/.ssh/ DEBUG=1 #秘钥模式
docker volume create -d vieux/sshfs -o sshcmd=root@l2:/docker/sshfs/ -o IdentityFile=/root/.ssh/id_rsa sshfs
docker run --rm -it -v sshfs:/docker busybox ls /docker

docker run --rm -v sshfs:/mount ivotron/fio:latest --minimal examples/sequential-fill.fio # 性能测试
14 M/s

清理

docker volume rm sshfs
docker plugin disable vieux/sshfs
docker plugin rm vieux/sshfs

##

docker plugin install --grant-all-permissions sapk/plugin-gluster
docker volume create --driver sapk/plugin-gluster --opt voluri=":" --name test
docker run -v test:/mnt --rm -ti ubuntu

2. NFS

docker-volume-nfs

docker plugin install yzlin/nfs

docker volume create -d yzlin/nfs -o src=root@l14:/docker/nfs nfs
docker run -it --rm -v nfs:/data alpine ls /data

`