On Docker for Mac what would be the host ip as seen from the container? [duplicate]

This question already has an answer here:

  • How to get the IP address of the docker host from inside a docker container

    7 answers

  • Emulate Bluetooth LE Adapter for Acceptance Testing
  • Push Docker Images into docker.io
  • Mapping exposed ports on Bluemix containers
  • Enable Thrift in Cassandra Docker
  • Pass command line arguments to Docker with Ansible
  • Populating Docker containers with sensitive information using kubernetes
  • docker for windows how to access docker daemon from container
  • How can I resolve the error oci runtime error: exec: no such file or directory when using docker run on Windows
  • connect robomongo to mongo instance running inside docker container
  • Docker compose using environment variables to set extra host
  • DOCKER + PDO: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  • Problems running scala/play project with Docker
  • One Solution collect form web for “On Docker for Mac what would be the host ip as seen from the container? [duplicate]”

    You can get the ip of the host from within the container by running this command:

    /sbin/ip route|awk '/default/ { print $3 }'
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.