corectl icon indicating copy to clipboard operation
corectl copied to clipboard

Solution for monitoring file changes over NFS

Open quinncomendant opened this issue 8 years ago • 4 comments

I've discovered build tools such as fsmonitor and browser-sync use inotify to watch for changes. inotify doesn't work over NFS [1] [2]. NFS in corectl-managed docker containers otherwise works great—reliable and performs well. Is there any way to modify how NFS with corectl to allow for monitoring file changes? Any other ides? (I know this isn't really corectl-related, but I thought I could start here.)

quinncomendant avatar Mar 01 '16 14:03 quinncomendant

@quinncomendant it is more @AntonioMeireles end. Would you mind to tell me which OS you use in docker container to run NFS, is that only the client? As I having problems with NFS client on latest Ubuntu/Debian based docker images.

rimusz avatar Mar 01 '16 14:03 rimusz

I've based my image on node:slim which is based on buildpack-deps:jessie-curl (i.e., Debian). My buildtools Dockerfile:

FROM node:slim
RUN npm install -g autoprefixer browser-sync fsmonitor jshint jslint node-sass nsp parallelshell postcss-cli uglify-js
WORKDIR /src
ENTRYPOINT ["npm"]
CMD ["start"]

Then the developer will mount their project source from the host-mounted NFS volume with docker run -v /Users/username/project/src:/src buildtools (or the Compose file equivalent).

This is essentially a problem with inotify not working over NFS. I've submitted a more elaborated question to stackoverflow.

quinncomendant avatar Mar 01 '16 15:03 quinncomendant

I'm having a bit different issue, cannot mount NFS volumes from the inside container

rimusz avatar Mar 01 '16 16:03 rimusz

The open sourced docker: HyperKit / DataKit & VPNKit should provide ways to fix this, isn't it? using the osxfs they developed?

so0k avatar Jun 06 '16 06:06 so0k