I am trying to mount a host directory into a Docker container so that any updates done on the host is reflected into the Docker containers.
Where am I doing somethin
For Windows 10 users, it is important to have the mount point inside the C:/Users/
directory. I tried for hours to get this to work. This post helped but it was not obvious at first as the solution for Windows 10 is a comment to an accepted answer. This is how I did it:
docker run -it -p 12001:80 -v //c/Users/C/Desktop/dockerStorage:/root/sketches \
/bin/bash
Then to test it, you can do echo TEST > hostTest.txt
inside your image. You should be able to see this new file in the local host folder at C:/Users/C/Desktop/dockerStorage/
.