New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit notifications don't work when running inside of Docker container on Windows #292
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
I'm not sure how Docker for Windows is mounting the shared folder, but generally file shares such as NFS don't support notifications. A polling fallback (#9) is the only solution I know of when the underlying system doesn't provide events. For now we should document the limitation, but first we should confirm on other operating systems. It may work on Linux, depending on how the Docker container is mounted there. |
Currently it work perfectly fine with folder mount to docker on MacOS. |
I can confirm it works well under on Docker with Linux host (Manjaro distro). |
Which storage driver do you happen to be using? With @nathany's comment in mind, this could be filesystem dependent. In both 'working' cases, this sounds like a bind mount, not a K8's storage driver under the PVC subsystem |
This seems to do a good job of explaining the phenomenon here.. |
Sorta, see above. TL&DR This is a file-system compatibility issue. There are a few scenarios where it works when using the same underlying host filesystem, but pretty much never if there is any translation. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Closed as duplicate of #9; if the underlying OS mechanism doesn't work then there's not much we can do about it other than implement a polling fallback. |
I'm running Windows 10 Enterprise, 10.0.17134
My goal is to launch a docker container, mount a volume inside the container, edit files in the volume from my host operating system and have the docker container recognize the change events. Pretty much this: https://www.zachjohnsondev.com/posts/go-docker-hot-reload-example/
Steps to reproduce
main.go
file and add the following:docker-compose
file and add the following:Dockerfile
file and add the following:docker-compose build
in the directory where you've created the files.docker-compose up
in the directory where you've created the files.main.go
and notice that no edit events are reported.docker exec -it bar bash
to connect to the docker container. Editmain.go
from the container shell to confirm that edit events are being reported when the edit is performed within the container.The text was updated successfully, but these errors were encountered: