docker run -it alpine:3.16 ✔
/ # ls
bin dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var
/ # ping
baidu.comPING
baidu.com (110.242.68.66): 56 data bytes
64 bytes from 110.242.68.66: seq=0 ttl=50 time=42.188 ms
64 bytes from 110.242.68.66: seq=1 ttl=50 time=40.774 ms
^C
---
baidu.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 40.774/41.481/42.188 ms
### 192.168.124.23 是我的宿主主机的 IP
/ # ping 192.168.124.23
PING 192.168.124.23 (192.168.124.23): 56 data bytes
64 bytes from 192.168.124.23: seq=0 ttl=64 time=0.081 ms
64 bytes from 192.168.124.23: seq=1 ttl=64 time=0.149 ms
^C
--- 192.168.124.23 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.081/0.115/0.149 ms
/ # ifconfig
eth0 Link encap:Ethernet HWaddr 02:42:AC:11:00:02
inet addr:172.17.0.2 Bcast:172.17.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7615 (7.4 KiB) TX bytes:614 (614.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 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)
/ #
mysql 在宿主机器有什么问题,完全没问题啊