Created
October 16, 2018 04:51
-
-
Save muka/cc76ee644530f67977b40db140f4eb04 to your computer and use it in GitHub Desktop.
Extract the ip from a docker-compose set of container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NET_NAME="project_default" | |
NAME="nats" | |
IP=docker network inspect $NET_NAME | grep $NAME -A 3 | grep "IP" | grep -Po "([0-9]+.[0-9]+.[0-9]+.[0-9])" | |
echo $IP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment