7

I installed docker for desktop windows. Created docker file and ran simple nodejs call. it works. Issue now is shared folder. There is no option in settings. Actually i dont see most options people see in them. Without shared folder its not easy to develpp apps. I use visual code. So i need a shared folder that can be used between linux docker container and windows 10 file directory. Any one help?

I google searched i cant find it anywhere. it seems like every one use docker in perfect condition?

alex K
  • 81
  • 1
  • 1
  • 5

4 Answers4

19

Please see https://docs.docker.com/docker-for-windows/

It states:

The File sharing tab is only available in Hyper-V mode, because in WSL 2 mode and Windows container mode all files are automatically shared by Windows.

I think this is what you are looking for. I also wasted too much time looking for this explanation.

Frank Monroe
  • 1,557
  • 2
  • 13
  • 20
1

Late to the party but as @Frank Monroe pointed out, you need to enable hyper V on your machine, open your PowerShell console as administrator then paste the below command. Restart your machine then go back to the docker settings uncheck the "use the WSL 2 based engine" as indicated in the image, once your docker is restart then you'll be able to see the file sharing option enter image description here

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Note: run the Powershell not the normal windows command-prompt

Mronzer
  • 399
  • 1
  • 7
  • 18
0

You are looking for "volumes": https://docs.docker.com/storage/volumes/

Dirk R
  • 357
  • 2
  • 13
0

To enable that option, you need to switch to Windows containers and for that you need a Windows 10 pro o enterprise build: enter image description here

To check Windows Version: Open Run with WIN + R and launch command winver: enter image description here

enter image description here

Daniel Orozco
  • 185
  • 10