-
Notifications
You must be signed in to change notification settings - Fork 291
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
Updates of files outside the container are not visible inside of it #7276
Comments
I have the same problem in docker 2.3.0.3 (45519). Command used: When editing a file in the host, the corresponding file in the mounted volume is not updated. This issue is the same as unresolved issue #5530 |
After doing some more digging, it looks like it may not be a problem caused by docker, but by WSL2. The reason this issue appears in 2.3.0.3 but not 2.1.X is the added reliance upon WSL2 that was added in the newer edition. The issue comes from Windows not passing inotify to WSL2. See:
One fix would be to bypass the inotify issue by hosting the code within a linux filesystem such as \wsl${dist}\ However, docker does not currently allow for mounting network locations, so this will not work. See: #5888 |
@InfamousStarFox you can mount WSL2 filesystems in a docker container if you run the docker command from the WSL2 distro. You can even do this from Powershell by using the Does that help? Once you've enabled WSL2, Windows filesystem performance is even worse than on Hyper-V, but mounting from WSL2 distros is fast! I just did some comparisons for the gigantum blog. |
I had this problem without WSL enabled (Hyper-V enabled instead). Was using Docker 2.3.0.3. I actually jumped through all the hoops to upgrade Windows 10 to the 2004 version so that I could install WSL2 hoping that it would fix this issue (it didn't of course). Looks like Windows bind mounts were broken while refactoring code the last few releases (probably in anticipation of WSL 2) as seen here #5530
That issue is closed now. Looks like automated close bot got it... So it looks like the workarounds are (ordered with increasing horribleness):
|
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
When a file in a mounted directory is changed on the Windows file system it is expected that the change becomes visible to the file as it is seen in the linux container.
Actual behavior
The change in the file is almost never visible from within the container.
To continue to develop with the present Docker-Desktop-Version after each (!) change in the code basis the command
docker-compose restart supplierportal.local
has to be issued to make the code change effective within the container.
Information
Please, help us understand the problem. For instance:
Yes, almost each time a file is changed in the IDE the content and the timestamp of the file is not changed in the container.
Yes, under 2.1.X the current mountings worked in team of several developers for more than a half of a year without any problem.
Yes, it appeared after migrating to version 2.3.0.3 (45519)
No.
The update problem exists for directories the are linked by
new-item -itemtype junction
and for those do not have these links.
The flag consistent is used for the volume mounts:
volumes:
- ./supplier_cloud:/home/sportal/lieferantenportalsource:consistent
Sorry to report that the problem is still there, at least on my machine.
With best regards,
Andreas
The text was updated successfully, but these errors were encountered: