Inotify don't work on Docker for mac
<p>I want to create Docker container for <a href="https://github.com/gaearon/react-hot-loader" rel="nofollow">react-hot-loader</a>. But inotify probably doesn't work inside the container. Therefore HMR is broken.</p>

<p>I use Docer for mac Version 1.12.0-rc2-beta16 (build: 9493).</p>

<p>This is my docker-compose.yml.</p>

<pre><code>version: "2"
services:
  web:
    build: .
    ports:
      - "8000:8000"
    volumes:
      - .:/usr/src/app
      - /usr/src/app/node_modules
</code></pre>

<p>My Dockerfile is below</p>

<pre><code>FROM node:6.2

RUN apt update &amp;&amp; apt install vim inotify-tools -y

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app
RUN npm install
COPY . /usr/src/app

EXPOSE 8000
CMD ["npm", "start"]
</code></pre>

<p>and I put <a href="https://github.com/gaearon/react-hot-loader" rel="nofollow">react-hot-loader</a> directories in the same directory. </p>

<p>When I execute <code>docker-compose up</code>, I can access <code>localhost:8000</code> and my React project works well. However, HMR doesn't work even though I edit my React components in my local machine.</p>

<p>When I tried to edit my React component inside a container, HMR worked well. </p>

<p>In addition, I checked whether inotify work well or not with <a href="https://github.com/rvoicilas/inotify-tools" rel="nofollow">inotify-tools</a>. Then inotify doesn't work when I edit a file on my local machine. Of course, it works well when I edit a file inside a container.</p>