Does DigitalOcean have a plan to offer shared storage volumes for Docker Swarm Mode in near future?

We have been using DO for all development/testing activities. We have successfully deployed a scalable staging environment using Docker Swarm Mode. The only glitch is that we can not scale the application container across multiple swarm nodes as these instances can not share a persistence storage (volumes) across the nodes. There are many suggestions from unofficial sources to use NFS, Flocker, GlusterFS, etc. But there is no clear direction / guideline from DigitalOcean.

Without an officially supported solution for shared storage from DO, we have to regretfully leave DO and join the AWS band wagon.


I have been running into a similar issue. Is there a suitable solution to be able to run replicas of a service across multiple nodes and use the same volume?

If there’s no official way, would using Flocker or GlusterFS be a workaround?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

rexray/dobs is a good option, but it seems that you can only have the volume attached to one node at each time (I suppose that is a digitalocean limitation), so this is not useful if you want to have the volume mounted into several nodes at the same time.

DigitalOcean does not have an official storage plugin for Docker Swarm. In general, I’d recommend using REX-Ray. It can be used with Docker Swarm as well as other schedulers like Kubernetes and Mesos. The initial implementation of the DigitalOcean plugin was done by a DO engineer.

You can handle the initial configuration by running:

  1. docker plugin install rexray/dobs DOBS_REGION=sfo2 DOBS_TOKEN=YOUR_API_TOKEN

Now running docker volume ls will expose any DigitalOcean block storage volumes you may have already created. You can create new ones via:

  1. docker volume create -d rexray/dobs --name do-volume-sfo2 --opt=size=100

Now you can treat that like any other Docker volume. The plugin will handle mounting it locally as needed.