Running Services in a Container

We have come thus far by carefully explaining the various aspects of the Docker technology. The previous chapters definitely have laid down a stellar foundation for the overwhelmingly accepted Docker platform and the forthcoming chapters will be like the meticulously crafted buildings on that grandiose foundation.

We described the important building blocks (the highly usable and reusable Docker images) to bring forth powerful Docker containers. There are briefs about the various easy-to-learn-and-employ techniques and tips on how to store and share Docker images through a well-designed storage framework. Typically, images have to go through a series of verifications, validations, and refinements constantly in order to be right and relevant for the aspiring development community.

In this chapter, we are going to take our learning to the next level by detailing the key steps in creating a small web server, run the same inside a container, and enable outsiders to connect to the containerized web server through the Internet.

In this chapter, we will cover the following topics:

  • Container networking
  • Container as a Service (CaaS) – building, running, exposing, and connecting to container services
  • Publishing and retrieving containers' port
  • Binding a container to a specific IP address
  • Autogenerating the Docker host port
  • Port binding using the EXPOSE and -P options
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset