webpack-dev-server polling inside docker container - heavy CPU usage

for windows 10 2004 and docker desktop wsl2 backend, webpack-dev-server watch work inside docker container volumes bound to the wsl2 directory but does not work volumes bound to the windows directory.

I use vscode with remote-containers extension.

I open \\wsl$\Ubuntu-18.04\home\... by vscode and "reopen in container" by command-pallet.


The solution I used was the docker-sync utility.

It runs in a container and keeps a Docker volume sync'd using rsync. The updates hit Docker's filesystem listener so you can "watch" instead of "polling".