g@ubuntu:~$ ifconfig
br-bd918c09d16c Link encap:Ethernet HWaddr 02:42:f2:35:bd:70
inet addr:172.19.0.1 Bcast:172.19.255.255 Mask:255.255.0.0
inet6 addr: fe80::42:f2ff:fe35:bd70/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3472 (3.4 KB) TX bytes:5199 (5.1 KB)
docker0 Link encap:Ethernet HWaddr 02:42:8c:2f:8f:90
inet addr:172.18.0.1 Bcast:172.18.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
ens33 Link encap:Ethernet HWaddr 00:0c:29:31:f4:03
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2056 errors:0 dropped:0 overruns:0 frame:0
TX packets:2056 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:161192 (161.1 KB) TX bytes:161192 (161.1 KB)
veth6edec6e Link encap:Ethernet HWaddr ea:00:1d:b9:d4:48
inet6 addr: fe80::e800:1dff:feb9:d448/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:756 (756.0 B) TX bytes:6633 (6.6 KB)
veth7b3cb4b Link encap:Ethernet HWaddr c6:69:f0:4f:45:3e
inet6 addr: fe80::c469:f0ff:fe4f:453e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:4988 (4.9 KB)
vethcfc6c98 Link encap:Ethernet HWaddr ce:e2:68:4c:c2:c0
inet6 addr: fe80::cce2:68ff:fe4c:c2c0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3444 (3.4 KB) TX bytes:6150 (6.1 KB)
@
MonoLogueChi @
NeilWang 转成 NAT 后连 Docker 里的 80 端口都访问不了, 也 ping 不了; 我的电脑地址是 172.17.32.250, 虚拟机里的 IP 怎么不是你们说的 IP 一样,而是变成了 172.19.0.1; docker 的 IP 也和虚拟机的不一样,是 172.18.0.1
要怎么解决?