Getting Started with Containerization Quickly using Docker

Given how disruptive containers are, it’s easy for enterprises to get over-excited and want to transform their applications quickly and jump right in. We encourage companies to clearly define their short- and long-term goals and build the runway needed to acclimate themselves to containers and the engineering culture that surrounds them for their growth and so you don’t stumble in the learning process.

Capgemini Engineering product support engineers have created, deployed and managed Docker containers for our industry-leading clients around the world. We have discovered how Docker can make it easier for organizations to automate infrastructure, isolate applications, maintain consistency, and improve resource utilization. The use of Linux containers to deploy applications is called containerization. Containers are not new, but their use for easily and quickly deploying applications is. So let us help explain what you need to know about docker containerization and take a quick dive.

A brief history of containers

Containers have been around since about 2000 when FreeBSD Jails and Oracle’s Solaris Zones were being used. Then Linux Containers (LXC) came along, developed by IBM and Google. LXC made running multiple isolated Linux systems on a single host possible. Then Docker made its appearance and made LXC easier and quicker to use.

Containerization vs. Virtualization

Containerization provides an isolation to run your application while sharing the same OS resources. On the other hand, Virtualization provides the same flavor but it has its own OS so VM systems can run different operating systems and VM will host multiple applications whose mix may change over time versus a container that will normally have a single application.

Virtual Machines (VMs): Containers:
Represents Hardware level Virtualization Represents Operating System Virtualization
Heavyweight Lightweight
Slow Provisioning Real-time provisioning and scalability
Limited performance Native Performance
Fully Isolated hence more secure Process level isolation hence less secure

Using Docker

Docker is based on client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface.

Getting Started with Containerization Quickly using Docker

Fig1. What a Docker container architecture looks like.

What the Docker daemon does.

The Docker daemon (dockerd) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.

How Docker Client runs.

Docker client is a key component that is used to interact with Docker. When you run the docker commands, the client sends these commands to docker ed, which executes them. The docker command uses the Docker API and can communicate with more than one daemon.

What the Docker Registry stores.

Docker registry is the place where Docker images are stored. It can be a Public registry or Local registry. Docker Hub and Docker Cloud are public registries that are available for everyone. Other option is to create your own private registry. Docker is configured to look for images on Docker Hub by default and if you use Docker Datacenter (DDC) for Enterprise, it includes Docker Trusted Registry (DTR).

Docker pull command for Images

The blueprints of the application form the basis of containers. We can use the docker pull command to download the image.

Containers

Created from Docker images and run the actual application. We can create a container using a docker run. A list of running containers can be seen using the docker ps command.

Dockerfile

A docker file contains instructions to build a Docker image. It automates image construction. We write all the commands or instructions in this file to create an image.

Docker Compose

We can divide our application into multiple containers. Docker Compose allows us to simplify the linking of containers. It is used to define applications using multiple Docker containers. It declares the information of multiple containers in a single file called ‘docker-compose.yml’.

There are many tools you can use to help to manage the deployment of containers. Mesos from Apache and Kubernetes from Google are such technologies, along with Docker’s own Swarm. Each of these is server cluster management software tools and help schedule and manages the deployment of containers. They allow Docker containers to be run at scale with more efficiency, which is especially useful if you have a large application with many components.

Typical flow of using docker commands:

Getting Started with Containerization Quickly using Docker

Next steps from this point would be to create your own image running a service or app in a container.

Capgemini Engineering brings unparalleled experience from across industries, along with deep expertise in the field in order to get your containerized applications up and running as quickly and efficiently as possible and help you meet the demands of time to market and growth.

Find Out how an Capgemini Engineering can help get you started with Containerization Quickly

Getting Started with Containerization Quickly using Docker


About the Article Authors

Amit Goel, Director – Technology

Amit has over 22 years of experience in the architecture, design, and development of cloud, big data, analytics, Java/J2EE and portal-based middleware in domains and architecting solutions in service provide various applications domain covering consumer service delivery platform (having flavors – content (mobile/PC/IPTV), rating & billing, enterprise-oriented. Extensive project co-ordination experience involving design and development, managing deliveries.

Vikas Joshi, Principle Systems Engineer

Vikas has over 18 years of experience in the IT industry in product and application design and development. He has been a Java developer (Java/J2EE) for almost 8 years, specializing in product designing and development. For the last few years, he is spending more time on architecture and designing J2EE applications.

Contact us

MEET OUR EXPERTS

Contact a Network Engineering Product Support and Sustenance Expert Today.

GET IN TOUCH