Docker Desktop for Mac started using osxfs
for supporting volume mounting on MacOS. According to their page, a command like this should mount the ~/Desktop
directory to the docker container:
docker run -it -v ~/Desktop:/Desktop r-base bash
Although I do see a Desktop
directory as expected, its contents are empty:
root@80cb534e4eeb:/# ls
bin boot Desktop dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@80cb534e4eeb:/# ls Desktop/
root@80cb534e4eeb:/# exit
exit
while there are definitely files in the Desktop
directory locally
Users-MacBook-Pro:~ user$ ls Desktop/
Screen Shot 2019-03-25 at 10.34.58.png Screen Shot 2019-03-25 at 22.26.10.png Screen Shot 2019-03-27 at 07.34.55.png
Screen Shot 2019-03-25 at 10.35.59.png Screen Shot 2019-03-25 at 22.26.11.png Screen Shot 2019-03-28 at 15.14.48.png
Screen Shot 2019-03-25 at 22.26.08.png Screen Shot 2019-03-25 at 22.47.32.png Screen Shot 2019-04-05 at 09.26.12.png
Screen Shot 2019-03-25 at 22.26.10 1.png Screen Shot 2019-03-27 at 07.34.33.png
The /Users
directory should be accessible according to the Preferences window. Seems like something is wrong with the docker configuration, but I haven't found any similar issues reported yet. Most issues related to osxfs
are about IO performance. Any ideas on how to further solve/investigate this issue?
docker run --rm -v /:/vm_root --entrypoint=sh alpine -c 'ls -l /vm_root/Users/user/Desktop'
ls -l /vm_root/Users/user
in the same way, I see that the only folders there are the folders that I have already tried to mount (even one non-existing locally). Seems like theUsers
directory of the VM does not correspond to the one of the local file system.