title: Docker share node_modules to host
body: <p>i have some scenario that i cant solve.
  angular 5 application development.
  docker file that copies the package.json and during the build npm installs the node_modules.
  and i want those node_modules to be visible on host so developer can work comfortably on /src folder.
  application works from container but when coding i cant use autocomplete because modules are not available.</p>
  
  <pre><code>FROM node:10 as node
  # FROM node:alpine as node
  RUN mkdir -p /app
  WORKDIR /app
  COPY . /app/
  RUN npm install -g @angular/cli@~6.0.3
  # RUN yarn --pure-lockfile
  # RUN yarn install --no-cache --frozen-lockfile --no-bin-links
  RUN npm install
  EXPOSE 4200
  CMD ng serve --host 0.0.0.0 --disable-host-check --watch --poll 1000
  </code></pre>
  
  <p>docker-compose.yaml</p>
  
  <pre><code>version: '3'
  
  services:
    frontend-service:
      build: ./frontend
      volumes:
        - ./frontend:/app
        - /app/node_modules
      ports:
        - 4200:4200
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/JAt7T.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JAt7T.png" alt="enter image description here"></a>
  any hints?</p>