I am new to docker and trying to understand its behaviour and working. I have been trying to dockerize my node-app. Below is the docker file.
Dockerfile:
FROM node
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
CMD [ "npm","start" ]
now I am using bind-mount and volumes to run the container with the following commnad:
docker run -d --rm -p 3000:80 --name feedback-app -v /app/node_modules -v "D:\Practice Courses\Docker\data-volumes-01-starting-setup:/app" feedbakcapp:bind-mount
before running this command local working directory is without the node_modules but as soon as I run the command, an empty node_modules folder is being created in the local (host) Dir.
I cannot figure out why is it happening.