Todays update for docker "17.06.0-rc1-ce-mac13" brough very good news.
  • Add an experimental DNS name for the host: docker.for.mac.localhost
Which means that from inside the container you can connect to host system using new DNS name "docker.for.mac.localhost". This is extremely useful for configuring XDebug, which connects to host system IDE.  Bye-bye custom scripts to pass host IP inside the container. Happy debugging!