Docker & Containers
Container networking
Explain why each container has its own network view, how a veth pair links it to the host, and why localhost inside one container cannot reach another.
What you will be able to do
- Explain how a container's network namespace, veth pair and bridge connect it to other containers.
- Use a container name on a user-defined network instead of a loopback address.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Docker & Containers
- Cgroups resource limitsAdvanced · 4 min
Explain how Docker resource flags become cgroup files that the kernel enforces, and how to read the limit a container really has on a live host.
- OOM exit codesAdvanced · 4 min
Explain what exit code 137 and the OOMKilled flag show, and separate a kernel memory kill from a crash or a manual stop before changing any limit.
- Bridge interfacesAdvanced · 4 min
Explain what docker0 and user-defined bridges are, how veth pairs attach containers to them, and where host routes and firewall rules can break container traffic.
- DNS in containersAdvanced · 4 min
Explain how containers find other containers by name through embedded DNS on user-defined networks, and why the default bridge and loopback resolvers behave differently…
- Registry authenticationAdvanced · 4 min
Explain how docker login stores registry credentials per host, why a rotated token breaks some runners, and how to pass a token without leaving it in shell history.
- Image signingAdvanced · 4 min
Explain what Docker Content Trust checks at pull time, why a valid signature is not proof of safety, and why deploys should record a digest.