---
title: "How does Docker networking resolve hostnames between containers on a user-defined bridge?"  
description: "How does Docker networking resolve hostnames between containers on a user-defined bridge?"  
author: "Lily Chitlangiya"  
published: 2026-09-30  
canonical: https://answers.mindstick.com/qa/117314/how-does-docker-networking-resolve-hostnames-between-containers-on-a-user-defined-bridge  
category: "Docker"  
tags: ["docker", "networking", "Containers"]  
reading_time: 1 minute  

---

# How does Docker networking resolve hostnames between containers on a user-defined bridge?

I need to explain how Docker networking works at a high level for an upcoming interview. Specifically, when you run multiple containers and connect them using a user-defined bridge network, how does name resolution actually happen? If container A tries to reach container B by hostname, what stops that from working on the default `bridge` network, and why does Docker's embedded DNS server make the user-defined network behave differently?

Also, is there any scenario where you'd still prefer to use `--link` or manually configure `--network host` instead of a custom bridge? I want to understand the practical boundaries of each networking mode, not just memorize the definitions.


---

Original Source: https://answers.mindstick.com/qa/117314/how-does-docker-networking-resolve-hostnames-between-containers-on-a-user-defined-bridge

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
