Hi,
Server can serve web to my Docker host successfully but not my containerized client. What is needed for containerized server to serve web to a containerized client? Or, is this normal behavior by design
Env:
Docker ver: Docker version 18.06.3-ce, build d7080c1
Docker host: RHEL 8 VM (Virtualbox)
My input:
docker network create testNet
docker run --name webserver --net testNet -d nginx:latest
docker run --name client --net testNet -it busybox:1.29 /bin/sh
–>docker network inspect testNet confirms both container IP addr
server - 172.21.0.2
client = 172.21.0.3
–>from within Busybox attached term
wget -O - http://172.21.0.2:80/
Connecting to 172.21.0.2:80 (172.21.0.2:80)
wget: can’t connect to remote host (172.21.0.2): No route to host
—>from my Docker host (RHEL 8) machine
wget -O - http://172.21.0.2:80/
This serves the page successfully "Welcome to Nginx!’
The server replies back to ICMP ping traffic from the client fine