https://rancher.com/ logo
Title
c

curved-pencil-15832

11/22/2022, 7:51 PM
hello. I think I found something about a bug in rancher desktop. I see there has been a bug about not being able to mount bind volumes (with docker compose, at least). from my experiments, it seems rancher can create these binds but only if they are directories in the host from the code, it looks like the bug could be in wsl-helper - it tries to open a file in (..)/docker-mounts/ but fails because it is a directory. it's prob getting confused along the way about it being a file. not sure how to fix it since I don't even know go 🤔 could there be a workaround?
actually, looks like foo:bar works. it's when specify the volume in long form that it doesn't work
s

sticky-summer-13450

11/23/2022, 9:23 AM
Are you trying to mount folders which are outside of your $HOME? IIRC, only a small portion of the host filesystem is available to mount in the RD VM. But I might be forgetting, or thinking about Mac and Linux which might be different for Windows.
I nearly remembered correctly... https://docs.rancherdesktop.io/faq/
Q: Does file sharing work similarly to Docker Desktop? Do I have to do any additional configuration to mount volumes to VMs?
A: Currently, the following directories are shared by default: `/Users/$USER` on macOS,
/home/$USER
on Linux, and
/tmp/rancher-desktop
on both. For Windows, all files are automatically shared via WSL2.
c

curved-pencil-15832

11/23/2022, 3:25 PM
the source file was in a sub directory in $HOME, yes rancher desktop devs should try a volume like this, to see if there's a bug:
myservice:
  ..
  volumes:
  - type: bind
    source: foo
    target: bar
with
- foo:bar
it worked fine
actually, I found out this might not have anything to do with rancher, because I had the same problem in a vm that has no rancher