This is the best way I’ve found to set up for a container to contact the host machine.
sudo ifconfig lo0 alias 172.16.123.1
Now you can use the IP
172.16.123.1 to contact your local host machine. Might want to store that in an environment variable.
Note: I had written a much longer, more indepth post, but a few unfortunate key strokes in Vim obliterated much of the post…
Did this help you out? It took me a few days to piece together all this information together, I hope this saves you some time (who knows, maybe the future me will be thankful I wrote this down). Let me know your thoughts. firstname.lastname@example.org