-
Notifications
You must be signed in to change notification settings - Fork 26.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NextJS v13.4.16 does not work in docker container #54093
Comments
Can you try changing |
add Labels area: examples |
inside Dockerfile
This is work thanks |
This is broken from 13.4.13 |
With the latest changes in stable Next.js setting HOSTNAME is not longer required for the image to function correctly 👍 Fixes #54093
@timneutkens Wouldn't your fix fallback to Docker's default HOSTNAME env which is the ID of the container? |
@michalvadak I verified the application runs correctly when removing the HOSTNAME env var: The reason this was set explicitly before is that there was a bug with IPv6 handling, if the hostname docker assigns was IPv6 instead of IPv4 Next.js wouldn't function correctly, that was fixed in the latest stable release thanks to @DuCanhGH, so now the HOSTNAME env var is no longer required by default 👍 |
@timneutkens you may want to update other Docker examples as well 0084166 :) |
Hello, If I remove 'ENV HOSTNAME 0.0.0.0', it doesn't work on Google Cloud Run. |
@nguaman sounds like Google Cloud Run doesn't provide HOSTNAME, perhaps a note with a commented out |
@DuCanhGH But now I upgraded to I am deploying it on AWS ECS |
@mhm13dev that doesn't even look like a proper hostname 💀 Can you try |
I tried these 3 values: 0.0.0.0, localhost, :: None of them worked. |
I think this hostname is given by AWS ECS |
@mhm13dev if 0.0.0.0 doesn't work then I don't really know either :( I have no experience with AWS ECS as well, so I can't tell why the hostname looks like that. Doesn't look like my PR is related as it just fixes issues with IPv6, whereas this hostname most likely isn't one. You know, going from |
@DuCanhGH sure thank you. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Fri, 11 Aug 2023 11:03:36 +0000 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 13.4.16 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A Next.js Config: output: standalone
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
https://github.com/vercel/next.js/blob/canary/examples/with-docker/README.md
To Reproduce
Describe the Bug
Docker container with Next app starts but do not serve any content
Expected Behavior
Docker container should start and serve application
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Google Clound
The text was updated successfully, but these errors were encountered: