Not sure if this helps, but instead of using a symlink I added a mount point for a separate drive I want to use under %Userprofile%\Docker using the Disk Management console. Docker seemed to be happy using these folders.
1 Open Disk Management Console
2 Right click on partition / drive you want to use for docker content
3 Click Change Drive Letter and Paths
4 Click Add
5 Select “Mount in the following empty NTFS folder”, and click Browse
6 Navigate to your user folder and select / create a folder to mount under
7 Click OK OK
You can now use this folder which is mapped to the separate partition
Verified here on windows 10 professional we are definitely all Fixed. Now able to do all sorts of amazing things with Windows + Docker + Linux containers where i share a file system with windows. Excellent work!!!
I had success using the handy Link Shell Extension tool and using ‘Junction’ as link type.
In case you are using this for developping on a WordPress plugin which original directory is outside the WordPress site: Be aware that composer could nuke the plugin directory and also the original plugin directory when you manage your plugin/themes using composer (e.g. roots Bedrock installation).
@friism Hi, updates ? Soft symlinks work fine when created through the Windows host machine (either through bash.exe or WSL) and show up correctly on containers/VMs, but symlinks created inside containers appear as text files on the Windows host machine. Why ? Any fix that will make Windows/WSL recognize those symlinks as pointers rather than text files ? If adding mfsymlinks option to SMB3 client, allows it to read symlinks correctly, there is no reason why Windows cannot interpret them as symlinks.
Symlinks created by Windows host machine (WSL/Bash.exe/cmd.exe)::
• Windows (WSL or Cygwin Bash.exe) - ️ symlink works
• Docker container - ️ symlink works
• Hyper-V VM - ️ symlink works
Symlinks created by Docker containers::
• Windows (WSL or Cygwin Bash.exe) - appears as a text file
Its 2 years already, is there a solution for making containers symlinks compatible with Windows Subsystem for Linux or Cygwin Bash ? Use case: I’m installing node_modules from both WSL side and Docker containers side. In WSL host machine, the container’s node_modules/.bin symlinks appear as text files rather than pointers.
This issue made me a lot of headaches, will switching to Linux host development setup remove the need for all these workaround ?
Docker Version
Windows 10 Pro 1803, OS build 17134.345, Developer mode turned on.
WSL Debian GNU/Linux 9.5 (stretch)
Docker for Windows 2.0.0.0-beta1-win75 (19925) edge 915f68b
are you talking to create docker volume , then mount to Linux container? or mount a host volume to Linux container, then checkout code to the mount point and make build inside the container?