I am trying to map docker container’s folders to local machine folders using docker volume. I created an image and ran container. When the container started running, I made some changes in the local machine files, but my changes are not reflecting in the container’s running application response.
#Specifying base image FROM node:alpine #Set Working directory WORKDIR = "/webapp/" #Copy the package json file COPY ./package.json . # Download the dependencies RUN npm install #Copy the remaining files COPY ./ ./ #Start up command CMD ["npm","run","start"]
Creating an image = docker build -f Dockerfile.dev .
Creating and running application in the container = docker run -p 3000:3000 -v folder_of_app:/webapp Image