命令如下:
[root@localhost ~]# docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
/shengc_tomcat_01 - 172.31.0.3
/shengc_mysql_01 - 172.31.0.6
/kaifa_tomcat_02 - 172.31.0.5
/kaifa_tomcat - 172.31.0.2
/kaifa_mysql_01 - 172.31.0.8