Docker – PaaS Compute Options

In Figure 9.11, you saw that containers are deployed with the help of a container runtime that is hosted on the host OS. Docker is an example of a container runtime that empowers developers to containerize their application. Every container is a package that comprises application code, runtime, system tools, and configuration.

FIGURE 9.11 Architectural comparison between virtual machines and containers

Figure 9.12 shows the Docker architecture. In this architecture, the host machine that is considered the Docker host is responsible for hosting the Docker engine. Users or developers will be interacting with the Docker engine via the Docker client. The Docker client translates the requests and sends this to the Docker engine via the REST API. Docker Engine oversees the local images, downloads images from Docker Hub, and deploys containers based on requests from the end users. Docker Hub is an online image repository where thousands of images are uploaded by different publishers. Once the image is downloaded, Docker Engine maintains a local copy of it so that the next time it can deploy the container without downloading the image.

The Docker platform is available for both the Linux and Windows operating systems; also, it can be hosted on Azure. In Azure, you can leverage Azure container instances to run a Docker container without the need to manage the infrastructure. The underlying infrastructure will be managed by Azure, and you can run your containerized applications easily.

When you work with Docker, there are certain terminologies that you need to be familiar with. The following are the key terminologies:

  • Container: This refers to an instance of a Docker image. Every container can be used to represent the execution of a single application, process, task, or service.
  • Container image: This is the package from which the container is created. The package includes a manifest of the dependencies and configuration. Usually, the container image is derived from a base image by stacking different configurations on top of another. Once the image is created, it’s immutable.
  • Dockerfile: This is a file containing the set of instructions required to build a Docker image. The first line will be the reference to the base image. Further operations that need to be executed on the base image are written in the order of execution.
  • Build: This refers to the process of building container images based on the instructions you have written. You write these instructions to a file called Dockerfile, which the container runtime can interpret. All the layers that you need to stack will be mentioned in the Dockerfile, and then the container can be built using the docker build command.
  • Pull: This is the process of downloading a container image from an image repository like Docker Hub, Azure Container Registry, or any other private repository.
  • Push: This is the process of uploading a container image from an image repository like Docker Hub, Azure Container Registry, or any other private repository.

FIGURE 9.12 Docker architecture

I hope that this will give you some basic understanding of containers and why they are popular nowadays. Now, you will see how you can deploy containers in Azure.

0 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms of Use | About | Privacy Policy | Cookies | Accessibility Help | Contact