Docker shared volumes are not updating on change in windows

Viewed 149

I'm trying to mount a shared volume in Windows using Linux containers in order to react to changes in the development environment.

This is my docker-compose.yml (version 2.8) for the service.

frontend:
    container_name: kampus-front
    build:
        context: ./vtl-campus-front/.
        target: ${DOCKER_COMPOSE_TARGET}
    ports:
        - '3000:3000'
    environment:
        - GQL_ENDPOINT=${GQL_ENDPOINT}
    depends_on:
        - backend
    volumes:
        - ./vtl-campus-front/src:/src/
        - ./vtl-campus-front/styles:/styles/

Im not getting any error and when I inspect the container it shows that the volume has been mounted.

enter image description here

But when I make a change it doesnt work, idk why, I know that Im supposed to allow Docker to mount, but im not event receiving the notification to allow it, is there an error in my yml or is there something else that I have to do?

Thanks

1 Answers
 "scripts": {
    ...
    "start": "WATCHPACK_POLLING=true react-scripts start",
    ...
  }

You need to add WATCHPACK_POLLING=true in package.json

Related