Skip to content

TayyabTalha/rclone-mnt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rclone.org

Rclone Mount Container

Lightweight and simple Container Image (alpine:latest - 44MB) with compiled rclone (https://github.com/ncw/rclone master). Mount your cloudstorage like amazon cloud drive inside a container and make it available to other containers like your Plex Media Server or on your hostsystem (mountpoint on host is shared). You need a working rclone.conf (from another host or create it inside the container). all rclone remotes can be used.

The Container uses a tiny trap function, to handle docker stop/restart ( fusermount -uz $MountPoint is applied on SIGTERM signal or app crashes also) on PID 1.

Usage Example:

docker run -d --name rclone-mount \
    --restart=unless-stopped \
    --cap-add SYS_ADMIN \
    --device /dev/fuse \
    --security-opt apparmor:unconfined \
    -e RemotePath="mediaefs:" \
    -e MountCommands="--allow-other --allow-non-empty" \
    -v /host/mount/point:/mnt/mediaefs:shared \
    mumiehub/rclone-mount

mandatory docker commands:

  • --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined

needed volume mappings:

  • -v /path/to/config:/config
  • -v /host/mount/point:/mnt/mediaefs:shared

Environment Variables:

Variable Description
RemotePath="mediaefs:path" remote name in your rclone config, can be your crypt remote: + path/foo/bar
MountPoint="/mnt/mediaefs" #INSIDE Container: needs to match mapping -v /host/mount/point:/mnt/mediaefs:shared
MountCommands="--allow-other --allow-non-empty" default mount commands, (if you not parse anything, defaults will be used)
UnmountCommands="-u -z" default unmount commands
AccessFolder="/mnt" access with --volumes-from rclone-mount, changes of AccessFolder have no impact because its the exposed folder in the dockerfile.
S3_ACCESS="S3_ACCESSKEY" Access Code For AWS
S3_KEY="S3_KEY" S3 Key

Use your own MountCommands with:

-e MountCommands="--allow-other --allow-non-empty --dir-cache-time 48h --poll-interval 5m --buffer-size 128M"

All Commands can be found at https://rclone.org/commands/rclone_mount/. Use --buffer-size 256M (dont go too high), when you encounter some "Direct Stream" problems on Plex Media Server (Samsung Smart TV for example).

Troubleshooting:

When you force remove the container, you have to sudo fusermount -u -z /mnt/mediaefs on the hostsystem!

Releases

No releases published

Packages

No packages published