Jump to content

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


tmchow

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

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...