When my mac is tethered to my iPhone it can't resolve localhost
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.