sahin / docker-network

Docker network finder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

network and docker-compose

gperreymond opened this issue · comments

Hi, if you use networks in docker-compose to start your env, then your command :

sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}'

Will return nothing, try to use something like :

sudo docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'

commented

Could you please PR for these.

Thx your contribution.

commented

Issue resolved, I did {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} in format. thx @gperreymond