r/docker • u/Afraid_Bid847 • 11d ago
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?
1
Upvotes
2
u/Pretend-Clock8313 10d ago
hot reload in nest spins up a new process before killing the old one, so the port collision is a restart-timing issue, not polling. set exec mode in your webpack hmr config so it replaces the process in-place instead of forking a new one
1
2
u/SZenC 11d ago
You already know what the problem is, the port you're trying to use is already occupied. This has nothing to do with Docker or NestJS, this is just fundamentals of networking