function docker_container_ip() {
container_ids=$(docker ps -aq)
for cid in ${container_ids}
do
info=$(docker inspect -f 'name={{.Name}} ip={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${cid})
echo -e "$cid \t $info"
done
}
Last active
June 1, 2017 03:42
-
-
Save vitojeng/cb884c5b2fb3bd06e68021efb0c62b2d to your computer and use it in GitHub Desktop.
List all docker container name and ip address
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment