docker service create --mount ...
provides two options for persistent data; bind mounts and named volumes. Bind mounts persist on the host created so will not work for you since not shareable.
Named volumes can be created using docker volume create
or created implicitly as part of docker service create
using --mount option, e.g.
$ docker volume create -d --driver cio --name cassandradb --opt profile=CASSANDRA
$ docker service create \
--mount source=cassandradb,target=/var/lib/cassandra,volume-driver=cio \
--replicas 1 \
--name cassandra \
cassandra
docker service create
defaults to named volumes so the type is not specified in the example. The volume driver supports portable volumes. Other volume drivers such as RexRay or Flocker also support portable volumes. Here is an article with examples on RexRay.
There are also --mount options for volume labels and volume options. You can pickup more info on bind mounts and named volumes.
Additional example using the Storidge volume driver.