[Vuejs]-Why does my node.js application run fine on both my local environment and my Docker container but on the latter I can't load the site in the browser?

0👍

The change from public to host seems to be the problem. Docker can’t find its way out of the container when one uses localhost, changing the PUBLIC_ADDRESS property to 0.0.0.0 instead of localhost seems to have resolved the issue.

NOTE: The unfortunate side-effect of this is that when working locally node is going to bind to all the local machine’s IPs instead of just localhost – which isn’t ideal. Still looking for the solution to that one…

The following SO post put me on the right path: ttps://stackoverflow.com/questions/75525595/why-am-i-getting-error-getaddrinfo-enotfound-localhost8081-when-executing-n

Leave a comment