nextjs container is never starting stuck at “ready in XXms” [closed]

I am trying to build my nextjs application in a container so that I can deploy it to ECS.

Unfortunately I have issues running the container. In order to rule out any issues with my own repo, I tried following their example guide on how to build nextjs containers, but still it for some reason fails to start.

The nextjs example repo can be found here: https://github.com/vercel/next.js/tree/canary/examples/with-docker-multi-env

Similar to my own repo, the logs are as follows:

  ▲ Next.js 13.5.2
  - Local:        http://localhost:3000
  - Network:      http://127.0.0.1:3000

 ✓ Ready in 165ms

And thats basically it – No matter how long I wait, it never starts. I tried building the container on windows as well as macos. (no luck on either)

So apparently my question was closed due to missing information.

I can add that I dug further into this issue, and it seems to be related to this thread: https://github.com/vercel/next.js/issues/54093?fbclid=IwAR3loi-bUTDNpZFpkHLNk0iez6lBnKHrJHXuAzA39OlEhhCM1LjYeGOO13c

Adding 0.0.0.0 as hostname instead of localhost seems to resolve the issue.

  • That looks ready to me. What makes you think it’s not?

    – 

  • Nothing is ever served, I added more details to my question.

    – 

  • There’s a big difference between “never starts” and “not accessible”. Glad you found a solution though

    – 

Leave a Comment