r/Nestjs_framework • u/Afraid_Bid847 • Oct 21 '26
Hot reload problem with Docker
I have a problem with NestJS in Docker. The hot reload creates an error that says the port is already in use. I tried the polling thing and it did not help. I am developing on macOS.
Can you help?
3
Upvotes
6
u/UpperNebula7365 Oct 21 '26
Why do u have to run the dev environment in docker in the first place? Just run on host machine , then when ur done building a feature , build and run it in docker before pushing it ! , honestly this days I don’t even build before deployment. I only use docker to run the database, redis , and some mcps and Devobs tools like Grafana etc
1
u/sereikis Oct 23 '26
is the error Node's
EADDRINUSEinside the container, or Docker failing to bind a published host port? if it appears only after a file change, share the exact error, your dev start script and Docker/Compose config (with secrets removed); for an in-containerEADDRINUSE, check whether the previous Nest process is still listening when the watcher starts its replacement.1
u/Fantastic-Cod-9048 Oct 22 '26
Check for hanging containers.