Connecting containers in host mode
All the configurations we have done up until this point have relied on using the docker0
bridge to facilitate connectivity between containers. We've had to consider port mappings, NATing, and container connection points. These considerations had to be made because of the nature of how we connect and address containers and to ensure a flexible deployment model. Host mode takes a different approach and binds containers directly to the Docker host's interfaces. This not only removes the need for inbound and outbound NAT but also restricts how we can deploy containers. Since the containers will be in the same network construct as the physical host, we cannot overlap service ports as this would cause a conflict. In ...
Get Docker Networking Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.