sapk / docker-volume-rclone

Use Rclone as a backend for docker volume (also as a plugin). This permit to easely mount a lot of cloud provider (https://rclone.org/overview).
MIT License
110 stars 9 forks source link

Add rclone cache support #18

Closed Wundark closed 4 years ago

Wundark commented 5 years ago

I have been using this for the past day and this volume plugin has worked flawlessly. Thanks

In rclone you can specify a cache to preserve network io and costs associated with accessing similar files many times.

Would it be possible to have the ability to provide a volume to this volume plugin to use a caching directory on the host?

sapk commented 5 years ago

Yes it works and that what I am using. Just generate a working rclone config file and base64 it. If you want I should be able to provide you my configuration as an example.

Wundark commented 5 years ago

If you could provide your config that would be great. On my side I can't see any data being written to the cache folder.

sapk commented 5 years ago

If you installed the "managed" plugin version (docker plugin install command) the plugin is running inside a "hidden" container managed by docker. The cache folder would be inside this container and not the host path.

You can find more details on another plugin of mine : https://github.com/sapk/docker-volume-gluster#legacy-plugin-installation Or https://github.com/sapk/docker-volume-rclone#how-to-debug-docker-managed-plugin-

sapk commented 5 years ago

For the configuration, you can find an example here : https://github.com/sapk/docker-volume-rclone/issues/9#issuecomment-457955774

sapk commented 5 years ago

In last release, I added a variant -with-mount that define a mountpoint on host that could be changed (https://docs.docker.com/engine/reference/commandline/plugin_set/#change-the-source-of-a-mount) to be use mainly to keep cached file outside container but I need to play with it before to choose the best solution. But feel free to try it if you want.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.