@huis
2016-12-02T09:19:12.000000Z
字数 499
阅读 216
Docker
docker inspect containerid | grep IPAddress | cut -d '"' -f 4
比如:
docker inspect 64ff8daa6626 | grep IPAddress | cut -d '"' -f 4##结果### 172.17.0.2# 172.17.0.2
ip route show## 结果172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.2
ss -l## 结果Netid State Recv-Q Send-Q Local Address:Port Peer Address:Portnl UNCONN 0 0 rtnl:kernel *nl UNCONN 0 0 rtnl:1689 *nl UNCONN 4352 0 tcpdiag:ss/20 *nl UNCONN 768 0 tcpdiag:kernel *nl UNCONN 0 0 6:kernel *nl UNCONN 0 0 10:kernel *tcp LISTEN 0 5 172.17.0.2:9999 *:*