1.0.3 • Published 7 years ago

get-docker-host v1.0.3

Weekly downloads
95
License
MIT
Repository
-
Last release
7 years ago

Usage

Allows Docker host IP to be retrieved from a container.

Slight variation on https://www.npmjs.com/package/docker-host-ip. Uses /sbin/ip route. Note that this can give the bridge IP rather than the host's IP, however this still seems to work in some situations.

getDockerHost((error, result) => {
  if (result) {
    console.log(result)
  } else if (error) {
    console.log(error)
  }
})