beginnerDocker Networking: Bridge, Host, Overlay, DNS & Port Mapping

Service A can't reach Service B by hostname despite both running

Two containers are started with plain `docker run` (no --network flag) and one tries to call the other by container name; it fails with a DNS resolution error. Diagnose. Expected reasoning: both containers landed on the default bridge network, which has no embedded DNS for container-name resolution. Fix: create a user-defined bridge network and run both containers attached to it (`--network app-net`), after which name-based resolution works automatically.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.

Service A can't reach Service B by hostname despite both running

Next Step

Continue to A container's published port works locally but isn't reachable from another machine on the network← Back to all Docker questions