How to get the ip and port of the docker host in a docker container?

When a docker container is starting, its explosed port would be mapped to a port of the docker host.

Of cause, I can use the specified mapped port, but, I don’t want to do so.

  • File permissions for mapped folders on host machine
  • How to edit ENTRYPOINT file of a docker image.
  • Getting “docker”: executable file not found in $PATH using marathon
  • Virtualbox inside docker container without host dependency
  • Cannot write into ~/.m2 in docker maven container
  • how to deploy Kubernetes nginx controller with kubeadm (k8s 1.4)?
  • Is there a method to get the ip and port of the docker host in a docker container when it is starting.

  • Docker container not starting when connect to postgresql external
  • AWS Cloudwatch logs with Docker Container - NoCredentialProviders: no valid providers in chain
  • Docker and Vagrant connection
  • Selenium: Unable to run GhostDriver(phantomJS) node on Docker Selenium Grid Setup
  • I can't run swift in docker using ubuntu14.04
  • Using docker to build rust executable for a separate environment
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.