docker-compose 常用命令 要获取所有容器名称及其IP地址只需一个命令 docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)