How to reach MacOSX from Container?

I know of 2 options:

  • Pass in the host IP to the container as an environment variable so it knows about the IP.

  • Or have the container point to a known static IP (like 10.254.254.254). Then alias the host to that IP.

      ifconfig lo0 alias 10.254.254.254