Skip to content

Instantly share code, notes, and snippets.

@vagelim
Created May 22, 2017 22:24
Show Gist options
  • Save vagelim/d1209f5075e20e46b68b7193544f29fc to your computer and use it in GitHub Desktop.
Save vagelim/d1209f5075e20e46b68b7193544f29fc to your computer and use it in GitHub Desktop.
Get a mapping of containers to host for service discovery via DNS
docker network inspect bridge | jq '.[].Containers[] | "\(.Name)", "\(.IPv4Address)"' | sed -e '$!N;s/\n/ /' -e 's/"//g' -e 's,/16,,g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment