When using a Docker container for a Node.js application and the node_modules
are bundled into the container the container is not updated when using docker-compose build
.
Example Dockerfile
:
FROM node
COPY package.json /my/app/
RUN cd /my/app && npm install
WORKDIR /my/app
There is a Github issue describing the problem which is about anonymous volumes.
The if is using the -V
CLI flag like this:
docker-compose up --build -V