This message was deleted.
# rancher-desktop
a
This message was deleted.
c
BTW test with
sudo
same error.
a
Did you verify
/etc/passwd
is a file on both your laptop and in the container?
c
Definity existing on both sides.
s
I have a feeling I remember reading in this Slack channel that only folders in $HOME could be mounted as volumes. Or maybe $HOME and a few other locations. I can't remember exactly...
c
This is really not that clear. Anyway managed my way around to run stuff a normal user in container without the need to mount
passwd
and
groups
files. Thank anyway !
s
https://docs.rancherdesktop.io/faq/#q-does-file-sharing-work-similarly-to-docker-desktop-d[…]do-any-additional-configuration-to-mount-volumes-to-vms
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
Nice ! Thanks.
👍 1
c
Using a wsl2 setup as well but for some reason it mounts Paths /mnt/wsl/rancher-desktop/run/docker-mounts/ instead of natively within wsl. Is there a fix for this? Works first container run but after running it again after a restart causes same issue
p
It needs the funny mount because WSL2 uses containers for different distros, and that's how we can share things across. We basically have to end up bind-mounting your mount source into the shared area, and then get dockerd to bind-mount it again into the container. It sounds like there's an issue with files though (which I thought we had fixed at some point); will need to take a look again. (But it's probably the same as #2461)
c
Cool, ill have a look and this is a way of recreating it, if it helps, by running it, stopping and re-running it which gives the error. Noticed when you try and bind things below it gets confused second time round
Copy code
- /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
https://github.com/mohimali/docker/tree/master/portainer
984 Views