Hot reload doesn't work inside Docker container
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/ArtoszBart/next-issue
To Reproduce
docker-compose up- make change in page.tsx
- save changes
Current vs. Expected behavior
Hot reload should reload the page to show changes, but changes is not visible in the browser
Provide environment information
Physical PC:
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Education
Available memory (MB): 16319
Available CPU cores: 16
Binaries:
Node: 20.18.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 15.0.0 // Latest available version is detected (15.0.0).
eslint-config-next: 15.0.0
react: 19.0.0-rc-65a56d0e-20241020
react-dom: 19.0.0-rc-65a56d0e-20241020
typescript: 5.6.3
Next.js Config:
output: N/A
Container:
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Fri Mar 29 23:14:13 UTC 2024
Available memory (MB): 7911
Available CPU cores: 16
Binaries:
Node: 20.18.0
npm: 10.8.2
Yarn: 1.22.22
pnpm: N/A
Relevant Packages:
next: 15.0.0 // Latest available version is detected (15.0.0).
eslint-config-next: 15.0.0
react: 19.0.0-rc-65a56d0e-20241020
react-dom: 19.0.0-rc-65a56d0e-20241020
typescript: 5.6.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
After saving changes in page.tsx on the PC, the .next/server/chunks/ssr on PC is updated same as page.tsx in container. However .next/server/chunks/ssr in container remains not updated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction repository and its docker-compose setup. Run docker-compose up, edit and save page.tsx, then compare the host and container .next/server/chunks/ssr contents while checking the next dev behavior. Done means changes made on the Windows host trigger hot reload and appear in the browser inside the container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, javascript, nextjs, node.js, react, typescript
- Domain
- developer-experience, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100