Git Product home page Git Product logo

docker-rclone-proxy's Introduction

rclone logo

Docker Rclone Proxy

中文指引: https://www.sheyilin.com/2020/04/docker-rclone-proxy

Project's DockerHub https://hub.docker.com/r/gqbre/docker-rclone-proxy

Lightweight and simple Container Image (alpine:latest - 160MB) with compiled rclone (https://github.com/ncw/rclone master).

You need a working rclone.conf

Usage Example:

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

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

HTTP Proxy commands: Set HTTP/S Proxy before mount conmands

  • -e Proxy="false"
  • -e ProxyTarget="host.docker.internal"
  • -e ProxyPort="1087"

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.
Proxy="false" use http/s proxy setting or not
ProxyTarget="host.docker.internal" default host.docker.internal to connect the host machine (docker version 18.03+ supported but unreliable), set 172.17.0.1 in Synology DSM
ProxyPort="1087" port of http/s proxy

Use your own MountCommands with:

-e MountCommands="--allow-other --allow-non-empty --buffer-size 32M --vfs-read-chunk-size=32M --vfs-read-chunk-size-limit 2048M --vfs-cache-mode writes --dir-cache-time 96h"

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 execute sudo fusermount -u -z /mnt/mediaefs on the hostsystem!

The ProxyTarget with value host.docker.internal is unreliabled, try 172.17.0.1 in Linux like Synology DSM, or use real IP address instead. Or you can try --network host mode to use host networking, with setting ProxyTarget=localhost to connect to host machine.

If you get an error like "docker: Error response from daemon: linux mounts: path /volume1/xxx is mounted on /volume1 but it is not a shared mount.", or "umount: can't unmount /mnt/mediaefs: Invalid argument" in Synology NAS(群晖) DSM operating system because of the :shared tag. Maybe you should try the command sudo mount --make-shared /volume1 before runing the docker container, remember to change /volume1 to match your real setup.

Thanks

This project base on mumiehub/rclone-mount

docker-rclone-proxy's People

Contributors

gqbre avatar

Stargazers

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

Watchers

 avatar  avatar

docker-rclone-proxy's Issues

Any possibility of arm64/v8 support?

Hi there and thanks a ton for your fantastic modification!
I've evaluated several rclone-mount dockers but none of them support arm64/v8 architecture.
Is it possible for you to implement one?

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.