title: How can I pass to my source code the package-lock.json file generated inside my container?
body: <p>I am trying build a good workflow to work with docker and nodejs</p>
  
  <p>I think that I have a good base, but I can not get the package-lock.json generated inside my container to my source code even though I have a defined volume</p>
  
  <p>this is my Dockerfile:</p>
  
  <pre><code>FROM node
  WORKDIR /app
  
  COPY ./package.json ./
  RUN npm install
  RUN npm install -g nodemon
  COPY ./src ./src
  
  EXPOSE 3000
  
  CMD ["nodemon", "./src/index.js"]
  </code></pre>
  
  <p>and this is my docker-compose.yml:</p>
  
  <pre><code>version: '3'
  services:
    web:
      build: ./app
      command: nodemon ./src/index.js
      ports:
        - '8080:3000'
      volumes:
        - ./app/src:/app/src
        - /app/node_modules/
      links:
        - mysql
    mysql:
      image: mysql:5.6
      environment:
        - MYSQL_DATABASE=dev
        - MYSQL_USER=dev
        - MYSQL_PASSWORD=dev
        - MYSQL_ROOT_PASSWORD=dev
      ports:
        - '3306:3306'
  </code></pre>
  
  <p>In order to commit the package-lock.json to my version control tool, everytime I install a new package through <code>npm install</code> inside my container and a package-lock.json is generated/updated, I wanna move on to my source code the generated package-lock.json file </p>