Need to mount a drive (SSHFS) that's accessible to docker containers but need to use ZeroTier which is a container itself


Recommended Posts

I want to mount a drive on a remote server using SSHFS (installed via NerdTools). Problem is several fold:

 

  1. I want to connect to the server using my ZeroTier network and that server's zeroTier IP. I am running ZeroTier in a docker container successfully already so that's not the issue.
  2. The issue is that it seems that drives that are mounted are NOT visible to docker containers unless they are mounted BEFORE the docker service starts.  Given ZeroTier is in a Docker Container, I have a circular problem it seems.

 

My first ideas was to use a User Script tied to "At Startup of Array", which should mean it's always run BEFORE the docker service starts (since it needs the array started).  However, if I do it that way, ZeroTier docker containers hasn't yet started, so the remote server won't be accessible via ZeroTier IP.

 

Any ideas of what I can do here? Is what I want to do impossible?  Or maybe I"m just doing something wrong and it's true that drive can be mounted AFTER docker server has started and still be visible by containers?

Link to comment

If i understand you correctly i think what you are looking for is the shared propagation setting for dockers mounted volumes (or maybe the slave option). I think those are available in the dropdown that lets you set r/rw for each folder in a docker template. Those options should allow submounts within the mounted folder to propogate to the container. 

https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation

Edited by primeval_god
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.