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

Troubleshooting communication between containers and the external network


Packets can only pass between containers if the ip_forward parameter is set to 1. Usually, you will simply leave the Docker server at its default setting of --ip-forward=true and Docker will set ip_forward to 1 for you when the server starts up. To check the settings, use the following command:

    # cat /proc/sys/net/ipv4/ip_forward
0  
# echo 1 > /proc/sys/net/ipv4/ip_forward 
# cat /proc/sys/net/ipv4/ip_forward 
1

By enabling ip-forward, users can make communication between containers and the external world possible; it will also be needed for inter-container communication if you are in a multiple bridge setup:

ip-forward = true forwards all the packets to/from the container to the external network

Docker will not delete or modify any pre-existing rules from Docker filter chain. This allows users to create rules to restrict access to containers. Docker uses docker0 bridge for packet flow between all containers...