-
Notifications
You must be signed in to change notification settings - Fork 285
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
MacOS file system events don't pass through to containers #1979
Comments
Unfortunately For Lima we are currently investigating 9p as an alternative to reverse-sshfs, but that too does not support filesystem events (and would be non-trivial to implement). Maybe one day we can switch to the Apple virtualization framework and use virtfs. |
Thanks for the information and explanation. Shame For now I have a hacky workaround, maybe someone can build a better hack off it for their use case. I use a filewatcher on the host to exec a touch of the file on the brew install fswatch
fswatch packages/app/src --event Updated --event Created --exclude ".*" --include "\\.tsx$" -l 10 | xargs \
-I{} -n1 sh -c "echo {} && docker compose exec app touch \$(echo {} |awk -F "/packages/" '{ print \"packages/\"\$2 }')" |
Thanks for sharing your workaround! |
Docker desktop is switching to VirtioFs now and still having the inotify, i tried to enabled VirtioFS in Rancher but still don't have the events sent to container. |
Me too, tried VirtioFS in Rancher but still no luck :( |
@jandubois the Lima project do support inotify lima-vm/lima#1913, maybe there should be a way to support it for Rancher too? |
Yes, of course. It requires an update to the bundled Lima version, and probably a checkbox to make it opt-in because the way it works is that the host-agent will collects all the inotify events on the host, send them to the guest-agent, which will then "touch" all the files that had an event, which in turn will trigger the kernel to send an inotify event inside the guest. So this is definitely an experimental configuration that can affect the files on the host. |
Problem Description
Compare with Docker for Mac's feature, osxfs
Test case
docker-compose.yml
inotify.sh
Expected Results
it should output
CREATE test.txt
andMODIFY test.txt
if the file system events pass from the host to the container.The file watcher in the container can be verified to work with:
Proposed Solution
Compare with Docker for Mac's feature, osxfs
Additional Information
This is a killer feature in Docker for Mac.
Preflight Checklist
The text was updated successfully, but these errors were encountered: