Coder Social home page Coder Social logo

docker-rclone-mount's Introduction

rclone.org

Rclone Mount Container

Lightweight and simple Container Image (alpine:latest - 160MB) 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 with entrypoint /bin/sh). all rclone remotes can be used. This image is based on the image made by mumiehub, but uses multi arch to create an image for x86-64, arm32 and arm64. Thanks to ckulka for the examples of multi architecture support on docker hub.

The Container uses S6 Overlay, to handle docker stop/restart ( fusermount -uz $MountPoint is applied on app crashes also) and also preparing the mountpoint.

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 /path/to/config:/config \
    -v /host/mount/point:/mnt/data:shared \
    web2brain/rclone-mount

mandatory docker commands:

  • --cap-add SYS_ADMIN --device /dev/fuse
  • --security-opt apparmor:unconfined - this was not necesary, but part of the original documentation
  • other commands from the original docker-compose.yml were commented out that were not needed: stdin_open: true, tty: true

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
ConfigDir="/config" #INSIDE Container: -v /path/to/config:/config
ConfigName=".rclone.conf" #INSIDE Container: /config/.rclone.conf
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.

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!

docker-rclone-mount's People

Contributors

cron410 avatar web2brain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.