-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Volume file changes are not detected in container on Windows 10 host #30105
Comments
This is a known limitation of Docker for Windows: https://docs.docker.com/docker-for-windows/troubleshoot/#/inotify-on-shared-drives-does-not-work As a workaround, you can probably use polling: https://www.npmjs.com/package/onchange#poll---p----poll- |
Let me close this issue; a more in-depth discussion about this can be found in the docker for windows issue tracker (I noticed you were already redirected from the docker compose issue tracker, apologies for that 😄); see here for that discussion docker/for-win#56 Thanks for reporting though, and feel free to comment here after I closed 👍 |
@friism Thank you for the advice with polling. |
FYI to whom it may concern: had a similar issue on macOS 10.14 on a MacBook Pro (15-inch, 2018) with Docker Desktop Community Version 2.0.0.0-mac81 (29211) File changes were not detected anymore at some point even though it worked for quite some time. Seems like the docker engine was unhealthy and restarting the engine worked fine. After more testing it seems like the docker engine does not like sleep modus that much. |
@JonathanStoye how did you fixed it? I have the same situation, wrapped angular-cli in docker, but it is not rebuilding after file changes. Have you added |
As I said I just restarted the docker engine and then it was fine again. In my case it was just the standby of Mac OS that seemed to cause troubles with docker |
@micdahl @friism @thaJeztah @JonathanStoye @dimitriy-k My solution is create a clone of INOTIFYWAIT full bash based on polling using a diff screenshot of filesystem, please take a look and support it work perfect on WINDOWS systems |
thanks @JonathanStoye |
This has been solved in the new stable release of https://docs.docker.com/docker-for-windows/release-notes/#docker-desktop-community-2200
|
Just upgraded to docker 2.2, currently having issues that changes are no longer detected.. |
There were some regressions in the Docker Desktop 2.2 release. I don't have a direct link to specific issues at hand, but they should be present in https://github.com/docker/for-win/issues This issue is specific to Docker for Windows / Docker Desktop (not something that can be addressed in this repository) |
Description
Using docker for developing an Angular CLI app, running via
ng serve
inside the container does not detect file changes made on the host in a volume. Therfore I have to restart docker run everytime I made changes to files. Timestamp and content of the files though are updated in the container. So alternative I can use touch inside the container to rebuild but this is not really a satisfying development flow as I have to do this for every changed file.Steps to reproduce the issue:
docker build
for the Dockerfile given belowng init
inside of the containernpm start
inside of the containerDescribe the results you received:
Edited file and timestamp change inside of the container, but ng build process is not restarted,
Describe the results you expected:
Edited file and timestamp change inside of the container and ng build process gets restarted,
Additional information you deem important (e.g. issue happens only occasionally):
Thought first, this was a docker-compose issue but running the container without compose had the same results.
Output of
docker version
:Output of
docker info
:Dockerfile
The text was updated successfully, but these errors were encountered: