Book Image

Troubleshooting Docker

By : Vaibhav Kohli, Rajdeep Dua, John Wooten
Book Image

Troubleshooting Docker

By: Vaibhav Kohli, Rajdeep Dua, John Wooten

Overview of this book

You?re pro Docker? You?ve read all about orchestration with Docker in books? Now learn how to troubleshoot Docker in practice. Gain all the tools to safely see Docker in action with this 2017 book.
Table of Contents (17 chapters)
Troubleshooting Docker
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
1
Understanding Container Scenarios and an Overview of Docker

docker0 bridge


docker0 bridge is the heart of default networking. When the Docker service is started, a Linux bridge is created on the host machine. The interfaces on the containers talk to the bridge and the bridge proxies to the external world. Multiple containers on the same host can talk to each other through the Linux bridge.

docker0 can be configured via the --net flag, and has four modes in general:

  • --net default: In this mode, the default bridge is used as the bridge for containers to connect to each other

  • --net=none: With this flag, the container created is truly isolated and cannot connect to the network

  • --net=container:$container2: With this flag, the container created shares its network namespace with the container named $container2

  • --net=host: In this mode, the container created shares its network namespace with the host

Troubleshooting Docker bridge configuration

In this section, we will look at how the container ports are mapped to host ports and how we can troubleshoot the...