main
黄海 12 months ago
parent 1c6c184a12
commit 6fec8d23ca

@ -109,3 +109,49 @@ docker run -d --name ms-manager-sass-ui -p 80:80 -v /etc/hosts:/etc/hosts ms-m
#### 安装 $Ping$
```shell
apt-get update
apt-get install iputils-ping -y
```
#### 查看宿主机$IP$
```shell
[root@localhost ~]# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:7ff:fe80:54b1 prefixlen 64 scopeid 0x20<link>
ether 02:42:07:80:54:b1 txqueuelen 0 (Ethernet)
RX packets 4206426 bytes 2354824710 (2.1 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3442306 bytes 746571948 (711.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.10.14.77 netmask 255.255.255.0 broadcast 10.10.14.255
inet6 fe80::20c:29ff:fe54:1f62 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:54:1f:62 txqueuelen 1000 (Ethernet)
RX packets 6180298 bytes 2946646464 (2.7 GiB)
RX errors 0 dropped 84 overruns 0 frame 0
TX packets 4710131 bytes 2571579064 (2.3 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# 查看端口
curl 172.17.0.1:7026
```
#### 查看$Docker$的$IP$
```shell
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 4d2b1da162ca
# 返回值
172.17.0.3
```

Loading…
Cancel
Save