Docker for windows is not syncing mounted volumes correctly.
Steps to repro:
- Create a container with volume sharing. I used -v c:/dev:/mnt/c/dev
- Create a file ‘c:\dev\foo.txt’ with contents ‘hello world’
- cp -R /mnt/c/dev to somewhere in the container, e.g. ~/dev.
- note the contents of ~/dev/foo.txt
- In the host c:\dev\foo.txt, change the content to ‘goodbye docker’
- in the container, rm -rf ~/dev
- re-copy /mnt/c/dev to ~/dev
- Note the contents of ~/dev/foo.txt
When I look in my container, the contents are still ‘hello world’. Docker is somehow reading old stale data.