Skip to content

Instantly share code, notes, and snippets.

@chsh
Created April 16, 2017 07:45
Show Gist options
  • Save chsh/0bdfd8c76a11ea391a0fad840ab2b288 to your computer and use it in GitHub Desktop.
Save chsh/0bdfd8c76a11ea391a0fad840ab2b288 to your computer and use it in GitHub Desktop.
How to get docker container ip.
CONTAINER_ID=`docker ps -q`
IP=`docker inspect --format="{{ .NetworkSettings.IPAddress }}" $CONTAINER_ID`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment