crooked-rocket-3338
07/18/2022, 3:32 PMcontainerd
/ nerdctl
successfully, now I switched to `moby`/`docker` and my mount (bind) are failing. (win11 / WSL2 / rancher desktop 1.4.1). I read a lot a related issues about that but cannot find a workaround does anyone have a lead for me ?
To reproduce :
docker run --mount type=bind,source=/etc/passwd,target=/etc/passwd --rm ubuntu:20.04
Returns:
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/mnt/wsl/rancher-desktop/run/docker-mounts/6b17adac-3323-46ab-933a-202faa10537a" to rootfs at "/etc/passwd": mount /mnt/wsl/rancher-desktop/run/docker-mounts/6b17adac-3323-46ab-933a-202faa10537a:/etc/passwd (via /proc/self/fd/6), flags: 0x5001: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
sudo
same error.adventurous-insurance-41443
07/18/2022, 4:59 PM/etc/passwd
is a file on both your laptop and in the container?crooked-rocket-3338
07/18/2022, 7:08 PMsticky-summer-13450
07/19/2022, 8:17 AMcrooked-rocket-3338
07/19/2022, 2:43 PMpasswd
and groups
files. Thank anyway !sticky-summer-13450
07/19/2022, 2:49 PMCurrently, the following directories are shared by default:on macOS,/Users/$USER
on Linux, and/home/$USER
on both. For Windows, all files are automatically shared via WSL2./tmp/rancher-desktop
crooked-rocket-3338
07/19/2022, 2:52 PMclever-analyst-53581
08/06/2022, 8:14 PMproud-jewelry-46860
08/08/2022, 5:11 PMclever-analyst-53581
08/09/2022, 9:00 AM- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
https://github.com/mohimali/docker/tree/master/portainer