Getting Started With the Docker RBD Volume Plugin rbd-docker-plugin
docker run -it --rm \
--privileged \
--name rbd-docker-plugin \
--net host \
--volume /dev:/dev \
--volume /sys:/sys \
--volume /etc/ceph:/etc/ceph \
--volume /run/docker/plugins:/run/docker/plugins \
--volume /var/lib/docker/volumes:/var/lib/docker/volumes \
base/archlinux /bin/bash -c "
pacman-key --refresh-keys
pacman --noconfirm -Syy
pacman --noconfirm -S ceph go git gcc xfsprogs
export GOPATH=\$HOME/go
export PATH=\$PATH:\$GOPATH/bin
go get github.com/yp-engineering/rbd-docker-plugin
go get github.com/Soulou/curl-unix-socket
RBD_DOCKER_PLUGIN_DEBUG=1 rbd-docker-plugin \
--create --config /etc/ceph/ceph.conf"
[0] ~ >> docker run -it --rm --volume-driver=rbd --volume foo:/mnt/foo centos:7 /bin/bash -c "echo -n 'Hello ' >> /mnt/foo/hello"
[0] ~ >> docker run -it --rm --volume-driver=rbd --volume foo:/mnt/foo centos:7 /bin/bash -c "echo 'world' >> /mnt/foo/hello"
[0] ~ >> docker run -it --volume-driver=rbd --volume foo:/mnt/foo centos:7 /bin/bash -c "cat /mnt/foo/hello"
Hello world