When my mac is tethered to my iPhone it can't resolve localhost My broadband internet died on the weekend and so, in order to get some work done I am tethering my MacBook Pro to my iPhone.

I am running a number of servers within docker containers.

If I deactivate the tethering and just connect to my usual wifi (despite it not having any ability to connect to the outside world due to the broadband being down) then host localhost works fine. But while tethered I can't resolve localhost at all. Running host localhost returns Host localhost not found: 3(NXDOMAIN)

I have tried this on my other Mac too with the same result, which is weird as I regularly travel and work via tethering off my iPhone and it's never been a problem before.

What could cause this to happen and how do I debug / fix it?
I like using fully qualified DNS and http://xip.io/ explains how to map whatever RFC1918 non-routable address you have set up in docker to avoid the whole localhost mess when you change up your route to the internet. 

This ends up being more solid for me rather than munkying about, especially if your tethering is IPv6 only which can complicate things.