Docker Community Forums

Share and learn in the Docker community.

Bind mount from /tmp is not visible in the host

Hello,

I am using latest docker desktop on mac. The problem is the following. I create a bind mount in my container. The source I specified as /tmp/myFolder. Container is created and is running, data is created in that folder in the container. What i would also expect is to go on my mac to /tmp and see data there, but its not present. So it seems that some other folder is used. I am sure that its not volume mount but bind mount. When i changed source to /private/tmp (that is the folder that /tmp points to) i started seeing my data being created. So I am a bit confused, what is going on and why? Also what I dont understand is that when i specify souce of the mount as the relative path and then run docker inspect then the path in the begin i see some foder containing _mnt. I am completely confused. What is file sharing in Docker desktop? Is it like “default” bind for any container? Do my problems have anything to do with file sharing? I have read the documentation many times but its very unclear. Is what i experiencing a bug in docker desktop and i cannot bind mount to /tmp?