Use Rclone With Docker
Requirement:
FUSE has to be installed on the host machine:
Installation:
- Store a local version of an already existing rclone config (in my case it was the default rclone config directory)
~/.config/rclone
- Create a new docker compose file based on the following template:
services:
rclone_****:
image: rclone/rclone
container_name: rclone_*****
privileged: true # Required for FUSE
user: 1000:1000
cap_add: # Required for FUSE
- SYS_ADMIN
security_opt: # Required for FUSE
- apparmor:unconfined
devices:
- /dev/fuse:/dev/fuse
command: "mount remoteInConfig: /mnt/hostDirectory --allow-non-empty --allow-other" ## --allow-other => gives access for OMV
environment:
- PHP_TZ=Europe/Oslo
volumes:
#Path to rclone config
- ~/.config/rclone:/config/rclone
#Volume for the remote directory
- /mnt/hostDirectoryLocal:/mnt/hostDirectoryDocker:shared
#Needed for FUSE to work in the container
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro