-
Notifications
You must be signed in to change notification settings - Fork 288
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
Inotify on shared drives does not work #56
Comments
@DeltaWhy thanks, this is a known limitation that we're trying to figure out how to address.
@londoncalling I checked the FAQ, and it looks like we don't have a mention that inotify doesn't work on Windows - it might be good to add. |
@friism adding it now to the FAQs |
@DeltaWhy We are using SMB for the file sharing and the Linux SMB implementation does not support change notifications. We have update the FAQ accordingly andI'm closing this issues. |
https://wiki.samba.org/index.php/Samba_3.0_Features_added/changed Samba 3.0.25:
|
@garveen unfortunately, the linux kernel implementation of SMB (in UPDATE: I think the above refers to the Linux SMB server being able to generate SMB change notification from inotify events. The opposite direction is what is needed by Docker for Windows: SMB change notifications generated by the server on the host need to be translated into the events on Linux |
@rneugeba maybe other than smb: If we have a tool that listen on native Windows' file system APIs, communicate with MobyLinux and generate Linux events, it would be great. Does this idea practicable? |
I assume Hyper-V doesn't have anything akin to VirtualBox shared folders? Inotify works great with Docker Toolbox as well as Vagrant. |
@DeltaWhy I haven't seen anything in the VBox source suggesting they support inotify on the shared folders, but I may have looked at the wrong place, but there seems plenty of evidence on the web that it doesn't, like for example: https://www.virtualbox.org/ticket/10660?cversion=0&cnum_hist=1 |
@rneugeba @friism SMB: https://www.vagrantup.com/docs/synced-folders/smb.html Hope you can get some inspirations from there! Thank you D4W developers. |
@kidlj yes, moving files and file changes back and forth works fine (as it does with Docker for Windows), but the inotify change notifications are not, and not with any of those solutions that you linked to either, at least not that I know of. Do you have an example of inotify working with either SMB, RSync or vbox shared folders? |
@friism Thank you for the explanation. I thought inotify was the same as file changes synchronization, but now I get it. I just found a vagrant solution for the same inotify issue, could it help? |
I guess I was mistaken. It looks like Rsync with rsync-auto should trigger inotify events since it's touching files on the Linux native FS, right? But that probably won't work for sharing a whole drive 😉 Vagrant-fsnotify looks very interesting but I wonder if that approach would also have performance issues when sharing a whole drive. You might need a Linux kernel module to tell what's being watched on the CIFS mount so the host side can watch those same things rather than the whole drive. |
This hurts too much for beeing closed. |
Why is this issue closed? I want to use Docker Native for local development across my entire organization but can't util inotify works for windows as well. I don't want to use polling because I want seamless integration between windows/mac code bases and don't want to change my webpack config files for example to use polling if you have a windows machine. Is there someplace for this feature/enhancement can be tracked so I know that status of it. |
I guess strategic bets are to wait for windows linux subsystem. But some cracky C# person wouldn't be that limited as most of us to fix this in upstream samba quickly. |
It would be nice if there was a Docker Native backlog that I could refer to so that I know when Docker is planning on address this (they say they will eventually as they want Docker for Mac/Windows to be the same). That way, I'd have an idea on when I can plan on having this implemented in my organization. |
@blaggacao Samba is implemented in C: https://github.com/samba-team/samba |
It looks like issue is so difficult to implement that developers don't even want to talk about it, that's why it gets closed without even discussing it. |
|
@rneugeba Is Docker planning on implementing this? Here is says, "Currently, inotify does not work on Docker for Windows. This will become evident, for example, when an application needs to read/write to a container across a mounted drive. This is a known issue that the team is working on." Is there an estimated time for this functionality being available? Or, is there somewhere on the Docker Github where future/current work like this is officially proposed/tracked? |
@frankgreco I've sent a PR to update the docs. As @rneugeba pointed out, we don't have a lot of good options at the moment. We're aware that this is an annoying limitation, and we're continuously evaluating progress in WSL and Samba to see what improvements we might incorporate. @frankgreco @asolopovas what programming framework are you using? Does it not have a polling mode for looking for filesystem changes, similar to nodemon? |
@friism I am using browsersync haven't found any polling modes in it but was searching for. I know that webpack has it but I use combination of browsersync with webpack and hot module reload and it does not seem to work if I enable poling just in webpack. I simply installed all necessary tools on my host so that I can operate looks like we just have to be a bit more patient. |
I know +1s in issue comments don't help but I'd just like to add my voice here and say this is an issue that I also care about very much and would love to see it addressed in the future. In fact, I found this issue here today because I saw this was an issue a few months ago and decided to come back and look for what the current status of this situation was. |
Hello everyone! I've looked for any kind of help and it al lbrought me here. Waiting for an update. Hopefully windows users won't be second-class citiziens soon. |
Most probably nothing is going to happen to fix this because WSL2 will
completely get rid of such issues.
Until then you can use docker-windows-notifier (or such tools out there) to
"polyfill" fs events.
…On Mon, Aug 19, 2019, 22:23 Lukortech ***@***.***> wrote:
Hello everyone!
I am writing here since there was no better place yet to be found.
I am using Win10.pro with Docker, but it seems that there are no changes
seen by webpack too, and I don't understand why won't my front-end env.
refresh after changes to the .ts files of any sort.
I've looked for any kind of help and it al lbrought me here. Waiting for
an update. Hopefully windows users won't be second-class citiziens soon.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#56?email_source=notifications&email_token=AAHLJQCPHHCKOTA65CDNEVDQFL6LJA5CNFSM4CNP5DY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4UFYMA#issuecomment-522738736>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHLJQGVA3FVMDVWY6ZY6OLQFL6LJANCNFSM4CNP5DYQ>
.
|
Docker already has a Tech preview out. https://blog.docker.com/2019/07/docker-wsl2-tech-preview/ |
Does anyone yet have any results with Docker Desktop Community 2.1.6.0/2.1.6.1 which should've fixed this problem? |
@mastacheata thanks for your port. Could you try the following on the latest edge release:
If the inotify event injection is working then you should see events inside the
Here's a screen capture of it working locally for me: https://youtu.be/M6lpN65yF38 |
@djs55 thx for the instructions... I tried your |
Same here (Docker Desktop 2.1.6.1 Build 40900, Docker Engine 19.03.5):
And that's it. No more output from the container after that when creating directories inside the mounted directory. |
@DeltaWhy @friism @scottkurz 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 |
Well, there are already 4-5 different versions of that. They all have downsides like not being able to transfer permission changes back and forth. Docker Desktop on WSL2 officially supports inotify events on mounted volumes. It's just not working for me or @scottkurz |
To clarify I'm not using WSL2 (or WSL). |
Well, than nothing is supposed to change. The inotify fix was only announced for docker running in WSL2 mode. |
@mastacheata please could you link example of this
|
The latest edge release of Docker Desktop (2.1.7.0) should have better support for inotify on shared drives (in regular Linux mode, not WSL2) -- It's worth trying if you have the time. There is a known bug when used with |
And of course all the forks of each. |
The support for
|
I hope the If not, please repro the problem (e.g. change a file on the host), capture a diagnostics and make a fresh ticket. |
How lucky of me!!! I had the same problem as OP. |
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. |
I'm using docker-compose to run a Node.js application with nodemon. The application source is on the Windows host and mounted on the container so that I can make changes without rebuilding. However, nodemon does not pick up file changes. If I exec a shell inside the container and touch one of the files from there, nodemon picks it up and restarts the app, but any changes from Windows don't seem to trigger the inotify events.
The text was updated successfully, but these errors were encountered: