title: How to add npm packages to docker images w/o remaking image or container?
body: <p><strong>Question:</strong>
  How can I install new packages and get docker image and container to recognize change, install and rerun w/o working developer interaction?</p>
  
  <p><strong>package.json</strong>: <em>notice that we have only 1 package</em></p>
  
  <pre><code>"scripts": {
    "start": "node_modules/.bin/nodemon"
  },
  "dependencies": {
    "express": "4.15.4" 
  }
  </code></pre>
  
  <p><strong>dockerfile</strong></p>
  
  <pre><code>FROM node:8.4.0
  
  ENV HOME /var/www
  WORKDIR ${HOME}
  
  COPY server/package.json server/tsconfig.json server/nodemon.json $HOME/
  RUN npm install
  EXPOSE 8191
  CMD [ "npm", "start" ]
  </code></pre>
  
  <p><strong>Make image</strong>:</p>
  
  <pre><code>docker build . -t testImage
  </code></pre>
  
  <p><strong>Run container</strong>:</p>
  
  <pre><code>docker run -p 8191:8191 -v $(pwd)/server/src:/var/www/src testImage
  </code></pre>
  
  <p>Everything works as intended <code>[nodemon] starting</code>node ./src/index.js`</p>
  
  <p><strong>The Problem:</strong></p>
  
  <p><code>npm install cors --save</code> <em>will add cors package</em></p>
  
  <pre><code>"scripts": {
    "start": "node_modules/.bin/nodemon"
  },
  "dependencies": {
    "express": "4.15.4",
    "cors": "^2.8.4",
  }
  </code></pre>
  
  <p>Problem is nothing will update in my docker container :(
  I do not want the developer to have to remake the image or to have to rerun the a container:
  <code>docker build . -t testImage</code>
  <code>docker run -p 8191:8191 -v $(pwd)/server/src:/var/www/src testImage</code></p>