get-docker-host

1.0.3 • Public • Published

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)
  }
})

Readme

Keywords

none

Package Sidebar

Install

npm i get-docker-host

Weekly Downloads

68

Version

1.0.3

License

MIT

Last publish

Collaborators

  • danielkermode