Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

docker ps with ip

docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)

The output will be:
/containerA - 172.17.0.4
/containerB - 172.17.0.3
/containerC - 172.17.0.2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #docker #ps #ip
ADD COMMENT
Topic
Name
8+4 =