Book Image

Learning Docker

By : Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh, Vinod kumar Singh, Jeeva Chelladhurai, Pethuru Raj Chelliah
Book Image

Learning Docker

By: Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh, Vinod kumar Singh, Jeeva Chelladhurai, Pethuru Raj Chelliah

Overview of this book

Table of Contents (18 chapters)
Learning Docker
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Exposing container services


So far, we have successfully launched an HTTP service and accessed the service from the Docker host as well as another container within the same Docker host. Furthermore, as demonstrated in the Build images from containers section of Chapter 2, Handling Docker Containers, the container is able to successfully install the wget package by making a connection to the publicly available apt repository over the Internet. Nonetheless, the outside world cannot access the service offered by a container by default. At the outset, this might seem like a limitation in the Docker technology. However, the fact of the matter is, the containers are isolated from the outside world by design.

Docker achieves network isolation for the containers by the IP address assignment criteria, as enumerated:

  1. Assign a private IP address to the container, which is not reachable from an external network.

  2. Assign an IP address to the container outside the host's IP network.

Consequently, the Docker...