Next.js Discord

Discord Forum

Failed to load host address when using standalone build on docker.

Unanswered
Cuckoo wasp posted this in #help-forum
Open in Discord
Avatar
Cuckoo waspOP
I have followed this instruction (https://github.com/vercel/next.js/tree/canary/examples/with-docker-multi-env) on how to build Next.js using docker with multiple env but faces some problem when i try to access to hosted address of docker container. I have attach some image that might help you guys understanding. Any help is much appreciate.

This is the logs from container::
2023-08-27 19:12:27 - ready started server on 127.0.0.1:3000, url: http://127.0.0.1:3000
2023-08-27 19:12:27 - info Loaded env from /tovtrip_aba_mini_app/.env.production
2023-08-27 19:12:27 - info Loaded env from /tovtrip_aba_mini_app/.env
Image
Image
Image
Image

2 Replies

Avatar
European sprat
Add environment variable

HOSTNAME=0.0.0.0
Avatar
Cuckoo waspOP
Thank you got it working.