Skip to content

Instantly share code, notes, and snippets.

@muka
Created Oct 16, 2018
Embed
What would you like to do?
Extract the ip from a docker-compose set of container
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