Docker Community Forums

Share and learn in the Docker community.

Docker for Mac inotify events only working from VIM

Version: Version 1.12.0-rc4-beta20 (build: 10404)

Computer restarted, images and containers recently build and created.

I mounted a volume for my source code and when I save a file from VIM in the host the hot/live reloading in the container works normally. However, If I save the file from an editor - Atom, TextMate, or even TextEdit, the hot/live reloading does not work.

By the way, the speed of the volume improved drastically from previous versions, though it could be even better. The only think I need to make the volumes system usable for source code editing is to get the same inotify events when working from Atom as when I edit the file in VIM.

Thanks in advance

There were some inotify event improvements in Beta 24 released last week. Could you try it out and let us know if your issues are resolved?

Thanks for participating in the Docker for Mac Beta!

Best regards,

David

Thanks David,

Right now I’m under heavy loads of work with my current setup. I’ll try out the improvements in maybe 2 or 3 hours and reply back to let you know my results.

Regards,

Hisa

@dsheets
The inotify events are also working from Atom now. However, volumes are still really slow when compared to having files updated in the container with rsync when saving the files, i.e.: RemoteSync plugin in Atom.

I’m going to switch back to no volumes and try again in later versions.

Hi,
I’m still experiencing the issue (Docker 1.12.1 for Mac, Mac OS 10.11). When I save file using VIM I trigger livereload, while Atom does not seem to affect it at all.

Interesting, for me it’s the other way around - inside docker the changes made by sublime, atom, textmate, nano on the host (osx) host are being picked up. but if i save with vim (on the host), inotify doesn’t know about it inside docker

@dsheets I’m still experiencing this very issue with the latest stable release of Docker for Mac. Elixir/Phoenix app using mix test.watch - changes with Vim to a file in a shared volume trigger an event while changes with Atom do not.

However, it is worth mentioning that changes to a file in Atom are recognized by our React w/ Webpack application.

Not working:
mix test.watch w/ elixir as the base image

Working:
webpack-dev-server --host 0.0.0.0 --port 5000 --inline --content-base . w/ node as the base image

Hi @cliffom,

It looks like mix test.watch uses the Erlang fs package which uses inotifywait here. In this invocation, it is watching for the CLOSE_WRITE event which is not a file mutation event and which has no analog in OS X’s FSEvents. We have a task to emulate CLOSE_WRITE on our roadmap but it is not currently supported as documented. I recommend following Github issue docker/for-mac#896 for updates. This feature is queued behind performance improvements so it has been slightly delayed.

Thanks for your report and sorry for the frustration.

Best regards,

David