Skip to content

Instantly share code, notes, and snippets.

@PetrGlad
Created August 6, 2019 14:56
Show Gist options
  • Save PetrGlad/5fefabe225086f6fa388dc271c14360b to your computer and use it in GitHub Desktop.
Save PetrGlad/5fefabe225086f6fa388dc271c14360b to your computer and use it in GitHub Desktop.
Get IP of a docker container
#!/bin/bash
docker inspect $1 | jq -r ".[0].NetworkSettings.Networks.${2:-bridge}.IPAddress"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment