Sign inSign up

hjdr4/docker-metadata

By hjdr4

•Updated about 9 years ago

Docker host IP from containers

Image
0

1.8K

hjdr4/docker-metadata repository overview

https://github.com/hjdr4/docker-metadata⁠

Run the container

docker run --privileged --net=host --restart=always hjdr4/docker-metadata The container requires some privileges to create a dummy interface and bind port 80.

Get host IP from containers

curl http://169.254.169.254/latest/meta-data/local-ipv4⁠ [iface] If iface is not passed, the daemon returns the first interface without 'lo' nor 'docker' in its name.

Tag summary

Content type

Image

Digest

Size

7.1 MB

Last updated

about 9 years ago

docker pull hjdr4/docker-metadata