Docker tutorial: Get started with Docker networking

Learn about the use cases for each of Docker's networking models, and how to best apply and tune them for your needs

Become An Insider

Sign up now and get FREE access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content. Learn more.

A common use case for Docker is networked services, and Docker has its own networking model to let containers speak to both each other and the outside world.

Originally, Docker containers had to be networked together by hand, or exposed manually to the outside world. The current networking model lets containers find each other automatically on the same host (or across different hosts), and be exposed to the world at large in a more controlled way.

There are four basic ways that Docker supplies developers with networking for containers. The first two, bridge and overlay networks, cover the most common use cases in production. The other two, host and Macvlan networks, exist to cover less common cases.

Docker networking: Bridge networks

Bridge networks let containers running on the same Docker host communicate with each other. A new instance of Docker comes with an default bridge network named bridge, and by default all newly started containers connect to it.

To continue reading this article register now