Two containers, web (nginx) and cache (Redis), run on the default bridge with no published ports. Map the network.
List the networks and inspect bridge:
sh
docker network inspect bridgeNote the Subnet and Gateway under IPAM.Config, and the containers under Containers.
Read web's IP directly:
sh
docker inspect --format '{{.NetworkSettings.IPAddress}}' webcurl localhost fails because web publishes nothing. Fetch the page by IP instead and save it:
sh
curl -s 172.17.0.2 > ~/web.htmlFinally, try to reach web by name from another container on the default bridge:
sh
docker run --rm alpine:3.20 ping -c 1 web