Jump to content

Can I pass mountpoint to dockers?


AndroidCat

Recommended Posts

I'm trying to pass a "mountpoint" /mnt/disks/192.168.0.150_unraid/eBooks/eBooks/ to the docker below as /mnt

 

/usr/bin/docker run -d --name="Ubooquity" --net="bridge" -e TZ="America/Chicago" -p 8085:8085/tcp -v "/mnt/cache/appdata/ubooqquity/":"/config":rw -v "/mnt/disks/192.168.0.150_unraid/eBooks/eBooks/":"/mnt":rw hurricane/ubooquity

 

Well, docker doesn't see the contents of said /mnt/disks/192.168.0.150_unraid/eBooks/eBooks/

I confirmed that docker's /mnt is empty using also docker exec bash, . There is no problem if I substitute that mountpoint with a local path.

 

Actually /mnt/disks/192.168.0.150_unraid/eBooks/eBooks/ comes from 'Unassigned Devices' plugin and is a valid mountpoint for another unraid.

 

I vaguely remember that using "remote directories" was a problem with docker long time ago. Is it still an issue, any way to circumvent this?

 

Thanks.

Link to comment

Works with no problems for me.  Passthrough up to 3 different remote mountpoints to various containers.

 

root@localhost:# /usr/bin/docker run -d --name="Ubooquity" --net="bridge" -e TZ="America/New_York" -p 8085:8085/tcp -v "/opt/appdata/Ubooquity/":"/config":rw -v "/mnt/disks/server_b_EBooks/":"/mnt":rw hurricane/ubooquity

 

And I just cleared my book library and rebuilt it today using that command.

Link to comment

Yeah..  I pass through the actual mount (not sub folders off the mount) to multiple containers with no problems.  If I need to only access a sub folder in a container, I reference the sub folder within it.

 

I don't see why it wouldn't work passing it through the host path, but obviously for some reason it doesn't like it.

Link to comment

It works now: I deleted appdata, recreated docker, mountpoints in Unassigned Devices and restarted unraid. After that it started working.

 

I can either pass the actual mount and specify subdir in Ubooquity or pass mount+subdir. It works either way.

 

At least that makes sense, I don't know what was wrong in the beginning. It got me thinking passing mountpoints is not allowed. I'm glad it is.

 

Thanks Squid!

Link to comment

Actually, if your docker was autostarted, you might have a mount race condition. Docker starts before the external mountpoint is mounted. I know for a fact that the autostart dockers start as soon as the array is mounted. But have no idea when the external mount point is mounted by the plugins

 

Link to comment

Archived

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

×
×
  • Create New...