Docker (>1.12) swarm storage options with DAB (distributed application bundles) on GCE

ok, we have a kind of working solution right now using nfs and volume mounting.

nfs setup

we have one instance on GCE ‘nfs’ that serves an nfs share, currently:

/srv/nfs

i created a swarm-tempate image that already has the nfs mount in the /etc/fstab.

service create *

to create a service with a ‘volume’ (old syntax) or ‘mount’ as it seems to be called now, we can now do:

docker service create --name postgres -p 5432:5432/tcp -m type=bind,source=/mnt/nfs/postgres,target=/var/lib/postgresql/data,writable=true postgres:9.5

since the nfs share is mounted on each worker it works ™.

i guess this is not the most elegant solution, but it seems to work for now, will write an update if we experience problems.

we’ll check if we can get mounts into our dsb/dab files next.