Sharing directory on host


I have a shared volume gluster file system on top of two 24-SAS array ZFS raidz2. I’m using gluster as a single mount point for both fileservers on a ubuntu 16.04 server. End users can access the mounted glusterfs only using sshfs, or ssh-cifs.

My end users are not particularly tech savvy, so I have to generate scripting which automatically mounts the filesystem on their local system which could be any number of OS (including debian, rhel, windows, macos, etc). The most difficult part of this is the cross platform aspect, so instead of generating scripts and software stack deployments for different OS, I figured that docker would be a great way to use a single code base to mount the share on the docker and then share the mounted filesystem with the host system. So in this instance, I’d be using docker with sshfs preinstalled, mounting the filesystem within the docker using a bash script, then making it accessible to the host.

I’m slightly confused about what docker can do in order to share the mounted folder with the host. If I understand correctly, this isn’t directly possibly in the sense of making the mount visible to the host OS. I’ve read that I can copy the files from the container to a shared folder on the host which is defined at docker runtime; unfortunately, this is not an option since the filesystem may several Tb of data. I was thinking it might be possible to generated a soft / hard link to mounted directory on the docker inside the shared folder from host. I have yet to test this out, but before I begin do you think this is a feasible approach, or is there a better way that I’m overlooking? For example, I should be able to make the file link within the docker, but will creation of a link in a shared docker folder created a corresponding and functional link on the host?

Also, assuming the linking option is feasible, then is there a way to grab an environment variable for a particular filesystem path on the host (e.g., the users Desktop directory) which is agnostic to OS platform? Or do I have to create something like a python wrapper to detect the OS, grab the relevant directory location, then launch docker with the discovered share location on the host?

Or would it be possible to sshfs mount the glusterfs directly to the containers mount point to the shared folder on the host? I’m not sure if nested mounts are prohibited, as that’s how glusterfs works with the ZFS volumes.

Bump. Is this not the right forum for this?