I’m currently running two web servers in my resin container. One to setup a WIFI hotspot with a local UI for networking, the other to handle the actual network communications. In order to communicate between them I had planed on using localhost. My experience so far is that this won’t work for the webservers. I found the following post https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach that says this will not be possible with how Resin is setup by default. The oddest thing is that when I SSH into my device I can run curl commands to localhost and they work.
In order to make localhost work we need to run with “–net=“host”” but that command is handled behind the scenes and instead uses the default bridge network. Are there any solutions that have worked for others? I have not found a way to run Resin with the host networking setup, is there a way?
I’m a networking novice, but my current plan is to attack this by trying to figure out the address of the bridge network, and use that as a loopback instead of localhost. Any thoughts or comments would be greatly appreciated.