ip能ping通,nameping不通
来源:4-5 容器之间的link
慕神7525874
2020-12-31
我按步骤重新操作了3次,还是name ping不通,ip可以ping通,请问怎么解决啊
写回答
1回答
-
麦兜搞IT
2020-12-31
您怎么操作的?能详细说一下么?我刚才随便试了一个container,可以通
~ docker run -d --name=web nginx dcc3f291b310006427b0745a75aa5d0c7bba993aef9ed08d3ca34dfd3120feeb ➜ ~ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dcc3f291b310 nginx "/docker-entrypoint.…" 3 seconds ago Up 2 seconds 80/tcp web ➜ ~ docker run --link=web -it busybox sh / # / # / # ping web PING web (172.17.0.2): 56 data bytes 64 bytes from 172.17.0.2: seq=0 ttl=64 time=0.113 ms 64 bytes from 172.17.0.2: seq=1 ttl=64 time=0.338 ms 64 bytes from 172.17.0.2: seq=2 ttl=64 time=0.171 ms ^C --- web ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0.113/0.207/0.338 ms / #
00
相似问题