Skip to content

Latest commit

History

History
23 lines (14 loc) 路 591 Bytes

reflect-node-modules-changes-in-container.md

File metadata and controls

23 lines (14 loc) 路 591 Bytes

Reflect node_modules changes in container

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