# 查看mysql容器ip
[root@localhost ~]# docker inspect --format='{{.NetworkSettings.IPAddress}}' mymysql[root@localhost ~]# docker inspect --format='{{.NetworkSettings.IPAddress}}' mymysql
172.17.0.2
[root@localhost ~]# # 格式:
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <container-ID>
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <容器名称>