Rclone mount inside the docker container

I'm building a docker image , and I want to use rclone mount inside the container not to mount the drive in the host system , how to do that ?

use google:) then if you hit problem you can not fix yourself ask on the forum

the problem is , I cannot run the mount cmd inside the container , I always get this error.

[ root@a95b37c76a26:/home/rclone/gdrive# rclone mount --allow-other --allow-non-empty --vfs-cache-mode writes --daemon Gdrive: /home/rclone/gdrive
2023/07/22 18:36:29 Fatal error: mount not ready ]

I tried everything on google , same problem always.

What I wanna do is to create a docker image that contain rclone and qbit-web , that I can run on my vps ,so that I can torrent my data directly to the mounted drive using rclone.

It's working when I mount the drive locally and configure qbit-web to directly leech to the mounted drive , but that's not what I want.

run this mount command with -vv flag and post output here

#0 0.780 2023/07/22 18:58:05 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "mount" "--allow-other" "--allow-non-empty" "--vfs-cache-mode" "writes" "-vv" "--daemon" "Gdrive:" "/home/rclone/gdrive"]

#0 0.781 2023/07/22 18:58:05 DEBUG : Creating backend with remote "Gdrive:"

#0 0.781 2023/07/22 18:58:05 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"

#0 60.78 2023/07/22 18:59:05 DEBUG : Daemon timed out. Terminating daemon pid 132

#0 60.78 2023/07/22 18:59:05 Fatal error: mount not ready

ok remove --daemon and run again

#0 0.916 2023/07/22 19:02:55 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "mount" "--allow-other" "--allow-non-empty" "--vfs-cache-mode" "writes" "-vv" "Gdrive:" "/home/rclone/gdrive"]
#0 0.916 2023/07/22 19:02:55 DEBUG : Creating backend with remote "Gdrive:"
#0 0.916 2023/07/22 19:02:55 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
#0 0.917 2023/07/22 19:02:55 DEBUG : Gdrive: Loaded invalid token from config file - ignoring
#0 0.997 2023/07/22 19:02:55 DEBUG : Saving config "token" in section "Gdrive" of the config file
#0 1.000 2023/07/22 19:02:55 DEBUG : Keeping previous permissions for config file: -rw-r--r--
#0 1.001 2023/07/22 19:02:55 DEBUG : Gdrive: Saved new token in config file
#0 1.231 2023/07/22 19:02:55 DEBUG : vfs cache: root is "/root/.cache/rclone"
#0 1.232 2023/07/22 19:02:55 DEBUG : vfs cache: data root is "/root/.cache/rclone/vfs/Gdrive"
#0 1.232 2023/07/22 19:02:55 DEBUG : vfs cache: metadata root is "/root/.cache/rclone/vfsMeta/Gdrive"
#0 1.232 2023/07/22 19:02:55 DEBUG : Creating backend with remote "/root/.cache/rclone/vfs/Gdrive/"
#0 1.232 2023/07/22 19:02:55 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfs/Gdrive/" to be canonical "/root/.cache/rclone/vfs/Gdrive"
#0 1.232 2023/07/22 19:02:55 DEBUG : Creating backend with remote "/root/.cache/rclone/vfsMeta/Gdrive/"
#0 1.232 2023/07/22 19:02:55 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfsMeta/Gdrive/" to be canonical "/root/.cache/rclone/vfsMeta/Gdrive"
#0 1.232 2023/07/22 19:02:55 DEBUG : Google drive root '': Mounting on "/home/rclone/gdrive"
#0 1.233 2023/07/22 19:02:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
#0 1.234 2023/07/22 19:02:55 mount helper error: fusermount3: fuse device not found, try 'modprobe fuse' first
#0 1.234 2023/07/22 19:02:55 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

This is the problem

you have to add to your docker fuse device. I think it is something like this in docker run:

--device /dev/fuse

but first make sure that you have fuse installed on your host system.

Thank you so much Sir , I really appreciate your time for trying to help me.

The problem got solved , when I use this --device /dev/fuse.

1 Like

Happy that it works.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.