# get-docker-host

> Allows Docker host IP to be retrieved from a container.

Latest version **1.0.3** (published 2017-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-docker-host
pnpm add get-docker-host
yarn add get-docker-host
bun add get-docker-host
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-05-15 |
| First published | 2017-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dankermode |
| Maintainers | danielkermode |

## Links

- npm: https://www.npmjs.com/package/get-docker-host
- npm.io page: https://npm.io/package/get-docker-host

## Recent versions

- 1.0.3 (latest) — 2017-05-15
- 1.0.2 — 2017-05-15
- 1.0.1 — 2017-05-15
- 1.0.0 — 2017-05-15

## README

# 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.

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

---
_Source: https://npm.io/package/get-docker-host · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
