Reputation: 43
I have a setup in which the changes of files in mounted volume is not being caught by Webpack. I have checked inside the container and the changes are happening to the file but Webpack is not catching them.
Strangely when inside the container and making the changes directly in the container using "vi", Webpack works fine and catches the changes and re-compiles. But changing the file from the host is not being caught even though the changes are visible to the file inside the container and the modification time of the file has changed.
Any clues on what is happening here ?
This is the Dockerfile:
FROM node:19-alpine3.16
RUN apk update && apk upgrade && apk add bash
RUN mkdir /app && mkdir /public
WORKDIR /app
COPY app/package.json /app
COPY app/yarn.lock /app
COPY app /app
RUN yarn set version 4.4.0 && yarn install && yarn build
CMD npm run local_dev
and this is the docker-compose:
version: '3.5'
services:
dev:
container_name: app
build:
context: ..
dockerfile: Dockerfile
volumes:
- '../app:/app'
ports:
- '8040:8040'
Upvotes: 0
Views: 6