I want to install the rclone Docker Volume Plugin (which uses a control file, typically rclone.conf). I already have this file. The folder location for this control file can be provided when the plugin is installed (and needs to exist) - see the config & cache parameters below:
I’m running Windows 10 w/WSL2 enabled. I confess it’s unclear to me how I setup a folder from my Windows filesystem that can be shared with Docker Desktop. All the docs refer to mounts/binds for user containers rather than Docker itself.
I’m not sure how plugins work in Docker Desktop, but if you can install a plugin and all your problem is that you need to access a config file, WSL2-based Docker Desktop let’s you access everything on the host basically to which you have access anyway.
The following command is just to list the folders:
docker run --rm -it -privileged --pid host ubuntu:22.04 nsenter -m -t 1 ls /mnt/host
In my case it shows “c e wsl wslg” and the first two are the drive letters. So I guess you could save the config at C:\Users\username\config and refer to it as “/mnt/host/c/Users/username/config”
Thanks for this. I’ve since tried providing a folder path using this format “/mnt/host/C/rcloneX” but see the following:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “/mnt/host/C/rcloneX/” to rootfs at “/data/config”: stat /mnt/host/C/rcloneX/: no such file or directory: unknown
Now this may be an issue with the rclone plugin (and I’ve posed the same question in their forum) but I also wonder whether there’s something different about plugins & perhaps they behave differently from other containers with respect to access to the host filesystem ?
Thanks Akos. I renamed my folder to all lowercase and used c not C for the drive. Same result though…
docker plugin install rclone/docker-volume-rclone:amd64 --alias rclone --grant-all-permissions args=“-v --allow-other” config=“/mnt/host/c/rclonex/” cache=“/mnt/host/c/rclonex/”
amd64: Pulling from rclone/docker-volume-rclone
Digest: sha256:64764bd9c44dfd51493053b2bb01c4d195508dc3e27205a8ca3aaa18d1e7e7d7
b3ccc0a5dd52: Complete
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “/mnt/host/c/rclonex/” to rootfs at “/data/config”: stat /mnt/host/c/rclonex/: no such file or directory: unknown
I checked, the plugin runs in the same container in which the docker daemon, so the problem could be that rclone requires a local folder, not a remote and what we tried, would have been a remote. I used rclone about a year ago and I don’t remember all the configurations, but you can create a Docker volume, copy your config to that volume and specify that for the plugin.
Some of the categories doesn’t allow us to mark a topic as solved. It looks like Docker Desktop for Windows is that kind of category. I can’t change that, but one day we will have to overview these issues.
Until that you can like individual posts if you want to by clicking on the heart icon on the left side under the posts.
Thank you for sharing it! I didn’t know about this. This is another difference between Docker Desktop on Windows and on other operating systems. There is no /run/desktop/mnt folder on macOS.