title: Is it possible to ignore a subfolder (e.g. node_module) in the mounted Volume in a docker container?
body: <p>I am now working on a nodejs project. There are too many small files in the node_modules folder. I want to move a docker-based development environment, so that the node_modules folder can be kept in the docker image (update when necessary). At the same time, I need the source folder of the app remain on the hosting environment. The following is the Docker file, I hoped to work:</p>
  
  <pre><code>FROM node
  MAINTAINER MrCoder
  
  // To simplify the process node_modules is installed and cached
  ADD package.json /opt/app/
  WORKDIR /opt/app
  RUN npm install
  
  // will be mapped to the local app source folder
  VOLUME /opt/app
  
  // This is to test whether local node_modules or the folder in the image is used
  CMD ls node_modules
  </code></pre>
  
  <p>Apparently, when I change add any file in the local node_modules folder it is listed.</p>