Containerizing Your Application with Docker

In the last few years, one technology in particular has been making headlines on the net, on social networks, and at events—Docker.

Docker is a containerization tool, which became open source in 2013. It allows you to isolate an application from its host system so that the application becomes portable and code tested on a developer's workstation can be deployed to production with fewer concerns about execution runtime dependencies. We'll talk a little about application containerization.

A container is a system that embeds an application and its dependencies. Unlike a VM, a container contains only a light operating system with only the elements required for the OS, such as system libraries, binaries, and code dependencies.

To learn more about the differences between VMs and containers, and why containers will replace VMs in the future, I suggest you read this blog article: https://blog.docker.com/2018/08/containers-replacing-virtual-machines/.

The principal difference between VMs and containers is that each VM that is hosted on a hypervisor contains a complete OS and is therefore completely independent of the guest OS that is on the hypervisor.

Containers don't contain a complete OS – only a few binaries—but they are dependent on the guest OS, using its resources (CPU, RAM, and network).

In this chapter, we will see how to install Docker on different platforms, how to create a Docker image, and how to register it in Docker Hub. Finally, we'll discuss an example of a CI/CD pipeline that deploys a Docker image in Azure Container Instances (ACI).

This chapter covers the following topics:

  • Installing Docker
  • Creating a Docker file
  • Building and running a container on a local machine
  • Pushing an image to Docker Hub
  • Deploying a container in ACI with a CI/CD pipeline 
..................Content has been hidden....................

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