Docker container and Rclone Mount

What is the problem you are having with rclone?

I want to mount gdrive in a docker Container

Run the command 'rclone version' and share the full output of the command.

rclone v1.53.3-DEV

  • os/arch: linux/amd64
  • go version: go1.18.1

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount gdrive: /mnt/gdrive/ --vfs-cache-mode writes

The Mount works fine. I can cd and ls the Mount. But as soon as I try to mount it in a Docker container like this:

volumes:
      - /mnt/gdrive/server/audiobooks:/audiobooks

I get the following Error on Container creation:

Error response from daemon: error while creating mount source path '/mnt/gdrive/server/audiobooks': mkdir /mnt/gdrive: file exists.

I freshly installed rclone via apt install rclone and haven't changed anything in the config.

welcome the the forum,

The distributed versions of rclone are often quite out of date and for this reason we recommend one of the other installation methods if possible

so need to uninstall that ancient version and install v1.66.0.
https://rclone.org/install/#script-installation

This is ancient version of rclone. Please update to the latest one first.

I Did the Update, but unfortunately the Error is still the Same:

Error response from daemon: error while creating mount source path '/mnt/gdrive/server/audiobooks': mkdir /mnt/gdrive: file exists

Can you share the full docker compose file?