Windows 11 - 23H2 - 22631
WSL version: 2.3.24.0
Docker version 28.3.3, build 980b856
I have a number of containers in my stack and they all have no issues binding to the C and D drivers. E drive on the other hand doesn’t and really
As an example
- E:/Downloads/:/dls - Not working
- D:/Downloads/:/dls2 - Working
I have a number of containers in my stack and they all have no issues binding to the C and D drivers. E drive however mounts within the container and when I make directories/files from within the container they never appear with the the windows volumes but persist in the container. I believe is using some folder/partition in ext4.vhdx as that disk image seems to grow inline with file copies.
Also i find it odd that container logs produce no evidence that the drive can’t be mounted to the host volume. The only error I found was “[com.docker.backend.exe.volume][W] hostPathOfVolume /run/desktop/mnt/host/e/Downloads failed, skipping bind” in com.docker.backend.exe.log file
I have shared the E drive and provided both share and security full control to the account with which the containers run under. I went to settings ->resources → file sharing and added all drives.
To be more prcise, the bind mounting is done from the host into the virtual machine of Docker Desktop and then into containers. Even more precisely, some folders are already shared with the virtual machine so you can bind mount those folders from the virtual machine into the containers. Container logs are logs of the main process running inside the container. It knows nothing about whether the container should have a bind mounted folder or not. Only the container runtime could “notice” mounting issues or “Docker DEsktop” itself.
When using the WSL2 backend, there is no need to share folders with the virtual machine as WSL2 already has access to all.
What is strange is that you see the “File sharing” tab which should be available only when using the HyperV backend, not WSL. Or when Synchronized file sharing is enabled which is not about mounting folders. I went to my Docker Desktop 4.43 on Windows and I also saw the “File Sharing” tab. That tab links to the documentation: https://docs.docker.com/desktop/settings-and-maintenance/settings/#file-sharing where there is a note:
On Windows, the File sharing tab is only available in Hyper-V mode because the files are automatically shared in WSL 2 mode and Windows container mode.
So even if you see the file sharing option, unless you are using the Hyper-V backend, I don’t think that tab will do anything. I will ask someone if this is a bug or something intentional.
I’M not sure what could cause your issue yet, but I’m also curious about what @cavo789 asked assumed.