Mapping to rclone mount from within Windows Docker Desktop containers

What is the problem you are having with rclone?

I have mounted a Google Drive storage space in Windows 10 using a service (system account), mapping drive "P". I cannot reach this shared drive from within WSL2 or Docker containers. I've also tried mapping the drive from within WSL, but am unable to do so as root in WSL2, and a user account will not allow Docker to use the drive.

Run the command 'rclone version' and share the full output of the command.

PS C:\Users\jlavi> & 'D:\Program Files\rclone\rclone.exe' version
rclone v1.59.1

  • os/version: Microsoft Windows 10 Pro 21H2 (64 bit)
  • os/kernel: 10.0.19044.2006 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.18.5
  • go/linking: static
  • go/tags: cmount

Google Drive

.\rclone.exe mount --config "C:\Users\jlavi\AppData\Roaming\rclone\rclone.conf" --dir-cache-time 96h --cache-info-age 100h --vfs-cache-mode writes --allow-other --log-level INFO --log-file d:\logs\rclone.log --network-mode GD-Media-Archive-Crypt: p:
[GD-Media-Archive]
type = drive
client_id = 
client_secret = 
scope = drive
token = {"access_token":"","expiry":"2022-09-14T15:07:44.199313-04:00"}
team_drive =

[GD-Media-Archive-Crypt]
type = crypt
remote = GD-Media-Archive:media
password = 
2022/09/14 14:51:28 DEBUG : rclone: Version "v1.59.1" starting with parameters ["D:\\Program Files\\rclone\\rclone.exe" "mount" "--config" "C:\\Users\\jlavi\\AppData\\Roaming\\rclone\\rclone.conf" "--dir-cache-time" "96h" "--cache-info-age" "100h" "--vfs-cache-mode" "writes" "--allow-other" "--log-level" "DEBUG" "--log-file" "d:\\logs\\rclone.log" "--network-mode" "GD-Media-Archive-Crypt:" "p:"]
2022/09/14 14:51:28 DEBUG : Creating backend with remote "GD-Media-Archive-Crypt:"
2022/09/14 14:51:28 DEBUG : Using config file from "C:\\Users\\jlavi\\AppData\\Roaming\\rclone\\rclone.conf"
2022/09/14 14:51:28 DEBUG : Creating backend with remote "GD-Media-Archive:media"
2022/09/14 14:51:29 DEBUG : Google drive root 'media': 'root_folder_id = 0AKG1eTqjgDzUUk9PVA' - save this in the config to speed up startup
2022/09/14 14:51:29 NOTICE: --allow-other flag does nothing on Windows
2022/09/14 14:51:29 DEBUG : vfs cache: root is "C:\\Users\\jlavi\\AppData\\Local\\rclone"
2022/09/14 14:51:29 DEBUG : vfs cache: data root is "\\\\?\\C:\\Users\\jlavi\\AppData\\Local\\rclone\\vfs\\GD-Media-Archive-Crypt"
2022/09/14 14:51:29 DEBUG : vfs cache: metadata root is "\\\\?\\C:\\Users\\jlavi\\AppData\\Local\\rclone\\vfsMeta\\GD-Media-Archive-Crypt"
2022/09/14 14:51:29 DEBUG : Creating backend with remote "C:/Users/jlavi/AppData/Local/rclone/vfs/GD-Media-Archive-Crypt/"
2022/09/14 14:51:29 DEBUG : fs cache: renaming cache item "C:/Users/jlavi/AppData/Local/rclone/vfs/GD-Media-Archive-Crypt/" to be canonical "//?/C:/Users/jlavi/AppData/Local/rclone/vfs/GD-Media-Archive-Crypt/"
2022/09/14 14:51:29 DEBUG : Creating backend with remote "C:/Users/jlavi/AppData/Local/rclone/vfsMeta/GD-Media-Archive-Crypt/"
2022/09/14 14:51:29 DEBUG : fs cache: renaming cache item "C:/Users/jlavi/AppData/Local/rclone/vfsMeta/GD-Media-Archive-Crypt/" to be canonical "//?/C:/Users/jlavi/AppData/Local/rclone/vfsMeta/GD-Media-Archive-Crypt/"
2022/09/14 14:51:29 DEBUG : Network mode mounting is enabled
2022/09/14 14:51:29 DEBUG : Mounting on "p:" ("\\server\\GD-Media-Archive-Crypt")
2022/09/14 14:51:29 DEBUG : Encrypted drive 'GD-Media-Archive-Crypt:': Mounting with options: ["-o" "attr_timeout=1" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "--VolumePrefix=\\server\\GD-Media-Archive-Crypt"]
2022/09/14 14:51:29 INFO  : Test Folder/README.html: vfs cache: removed cache file as Removing old cache file not in use
2022/09/14 14:51:29 DEBUG : Encrypted drive 'GD-Media-Archive-Crypt:': Init: 
2022/09/14 14:51:29 DEBUG : Encrypted drive 'GD-Media-Archive-Crypt:': >Init: 
2022/09/14 14:51:29 DEBUG : /: Statfs: 
2022/09/14 14:51:29 DEBUG : Test Folder/README.html: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/09/14 14:51:29 INFO  : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item Test Folder/README.html was removed, freed 1998347 bytes
2022/09/14 14:51:29 INFO  : Test Folder/README.txt: vfs cache: removed cache file as Removing old cache file not in use
2022/09/14 14:51:29 DEBUG : Test Folder/README.txt: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/09/14 14:51:29 INFO  : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item Test Folder/README.txt was removed, freed 1643336 bytes
2022/09/14 14:51:29 INFO  : Test Folder/git-log.txt: vfs cache: removed cache file as Removing old cache file not in use
2022/09/14 14:51:29 DEBUG : Test Folder/git-log.txt: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/09/14 14:51:29 INFO  : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item Test Folder/git-log.txt was removed, freed 12419 bytes
2022/09/14 14:51:29 INFO  : vfs cache: cleaned: objects 0 (was 3) in use 0, to upload 0, uploading 0, total size 0 (was 3.485Mi)
2022/09/14 14:51:29 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:275071337802 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/09/14 14:51:29 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/09/14 14:51:29 DEBUG : /: >Getattr: errc=0
2022/09/14 14:51:29 DEBUG : /: Readlink: 
2022/09/14 14:51:29 DEBUG : /: >Readlink: linkPath="", errc=-40
2022/09/14 14:51:29 DEBUG : /: Getxattr: name="non-existant-a11ec902d22f4ec49003af15282d3b00"
2022/09/14 14:51:29 DEBUG : /: >Getxattr: errc=-40, value=""
The service rclone has been started.
2022/09/14 14:51:29 DEBUG : /: Statfs: 
2022/09/14 14:51:29 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:275071337802 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
...
The service rclone has been stopped.
2022/09/14 14:52:22 DEBUG : Encrypted drive 'GD-Media-Archive-Crypt:': Destroy: 
2022/09/14 14:52:22 DEBUG : Encrypted drive 'GD-Media-Archive-Crypt:': >Destroy: 
2022/09/14 14:52:22 DEBUG : Not calling host.Unmount as mount already Destroyed
2022/09/14 14:52:22 DEBUG : Unmounted successfully
2022/09/14 14:52:22 DEBUG : vfs cache: cleaner exiting
2022/09/14 14:52:22 ERROR : p:: Unmounted rclone mount
2022/09/14 14:52:22 DEBUG : rclone: Version "v1.59.1" finishing with parameters ["D:\\Program Files\\rclone\\rclone.exe" "mount" "--config" "C:\\Users\\jlavi\\AppData\\Roaming\\rclone\\rclone.conf" "--dir-cache-time" "96h" "--cache-info-age" "100h" "--vfs-cache-mode" "writes" "--allow-other" "--log-level" "DEBUG" "--log-file" "d:\\logs\\rclone.log" "--network-mode" "GD-Media-Archive-Crypt:" "p:"]

hello and welcome to the forum,

right now, i have a rclone mount run as root inside wsl2.
and windows can access the mount via
\\wsl$\Ubuntu-20.04\rclone\mountpoints\zork