Volume binding using docker compose on Windows

9997 picture 9997 · Dec 26, 2016 · Viewed 64.8k times · Source

I recently upgraded my Docker Toolbox on Windows 10, and now my volume mounts no longer work. I've tried everything. Here is the current mount path:

volumes:
  - C:\Users\Joey\Desktop\backend:/var/www/html

I receive an invalid bind mount error.

Answer

Amit Jain picture Amit Jain · Feb 27, 2020
  1. Share nfs path using docker settings

enter image description here 2. execute following command

docker run --rm -v c:/Users:/data alpine ls /data
  1. Set path in docker compose file as shown below enter image description here

  2. File copied to windows

enter image description here