Skip to content

Commit a699995

Browse files
committed
docs: update nextjs documentation
1 parent e88f9d8 commit a699995

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

apps/docs/content/en/docs/01-app/01-getting-started/14-deploying.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Next.js can be deployed to any provider that supports [Docker](https://www.docke
4343

4444
Docker deployments support all Next.js features. Learn how to [configure them](/docs/app/guides/self-hosting) for your infrastructure.
4545

46+
> **Note for development:** While Docker is excellent for production deployments, consider using local development (`npm run dev`) instead of Docker during development on Mac and Windows for better performance. [Learn more about optimizing local development](/docs/app/guides/local-development).
47+
4648
### Templates
4749

4850
- [Docker](https://github.com/vercel/next.js/tree/canary/examples/with-docker)

apps/docs/content/en/docs/01-app/02-guides/local-development.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ The experimental `serverComponentsHmrCache` option allows you to cache `fetch` r
133133

134134
[Learn more about the experimental option](/docs/app/api-reference/config/next-config-js/serverComponentsHmrCache).
135135

136+
### 8. Consider local development over Docker
137+
138+
If you're using Docker for development on Mac or Windows, you may experience significantly slower performance compared to running Next.js locally.
139+
140+
Docker's filesystem access on Mac and Windows can cause Hot Module Replacement (HMR) to take seconds or even minutes, while the same application runs with fast HMR when developed locally.
141+
142+
This performance difference is due to how Docker handles filesystem operations outside of Linux environments. For the best development experience:
143+
144+
- Use local development (`npm run dev` or `pnpm dev`) instead of Docker during development
145+
- Reserve Docker for production deployments and testing production builds
146+
- If you must use Docker for development, consider using Docker on a Linux machine or VM
147+
148+
[Learn more about Docker deployment](/docs/app/getting-started/deploying#docker) for production use.
149+
136150
## Tools for finding problems
137151

138152
### Detailed fetch logging

0 commit comments

Comments
 (0)