Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
Hot Reloading Page in React 17.0.2 within a container doesn't work

If I run locally run start

Everything works perfectly.

After executing the command docker run -p 3000:3000 -v /app/node_modules -v ${pwd}:/app b88c46febae5

I get an unresponsive server which is just stuck. I cannot terminate it by pressing CTRL + C

What I did....

Created .env file in a root project and inserted (in any order, separately, together, with a command npm start, etc.) None of the above worked for me.

FAST_REFRESH=false
CHOKIDAR_USEPOLLING=true 
package.json
"react": "^17.0.2",
"react-scripts": "5.0.0"

If I enter into a running container and watch those changes in the file I edited in my IDE - they've been applied.

Windows 10 with WSL 2

Here's a brief video https://sendvid.com/y0qbl7bl

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It just happened to me and I solved it by disabling the wsl2 backend in Docker (Settings > Resources > Disable that checkbox). Now I'm using Hyper V instead, and it works (though Docker UI says it is legacy).

Btw, when I converted Docker Desktop to use wls2 as the backend, it seemed to have deleted all my images, but once I converted it back they were there.

Another possible solution, mentioned in the question's comments, is moving the project folder to a location inside the Linux WSL2 filesystem. If my "legacy" solution eventually stop working, it will be the next thing I'll try.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!