Introduction to Docker

What is Docker ?





Wikipedia defines Docker as

an open-source project that automates the deployment of software applications inside containers by providing an additional layer of abstraction and automation of OS-level virtualization on Linux.

Wow! That's a mouthful. In simpler words, Docker is a tool that allows developers, sys-admins etc. to easily deploy their applications in a sandbox (called containers) to run on the host operating system i.e. Linux. The key benefit of Docker is that it allows users to package an application with all of its dependencies into a standardized unit for software development. Unlike virtual machines, containers do not have high overhead and hence enable more efficient usage of the underlying system and resources.


What are containers?


The industry standard today is to use Virtual Machines (VMs) to run software applications. VMs run applications inside a guest Operating System, which runs on virtual hardware powered by the server’s host OS.

VMs are great at providing full process isolation for applications: there are very few ways a problem in the host operating system can affect the software running in the guest operating system, and vice-versa. But this isolation comes at great cost — the computational overhead spent virtualizing hardware for a guest OS to use is substantial.

Containers take a different approach: by leveraging the low-level mechanics of the host operating system, containers provide most of the isolation of virtual machines at a fraction of the computing power.



Why we use containers?


Containers offer a logical packaging mechanism in which applications can be abstracted from the environment in which they actually run. This decoupling allows container-based applications to be deployed easily and consistently, regardless of whether the target environment is a private data center, the public cloud, or even a developer’s personal laptop. This gives developers the ability to create predictable environments that are isolated from the rest of the applications and can be run anywhere.

From an operations standpoint, apart from portability containers also give more granular control over resources giving your infrastructure improved efficiency which can result in better utilization of your compute resources.


Due to these benefits, containers (& Docker) have seen widespread adoption. Companies like Google, Facebook, Netflix and Salesforce leverage containers to make large engineering teams more productive and to improve utilization of compute resources. In fact, Google credited containers for eliminating the need for an entire data center.


Features of Docker :


  • Docker has the ability to reduce the size of development by providing a smaller footprint of the operating system via containers.

  • With containers, it becomes easier for teams across different units, such as development, QA and Operations to work seamlessly across applications.

  • You can deploy Docker containers anywhere, on any physical and virtual machines and even on the cloud.

  • Since Docker containers are pretty lightweight, they are very easily scalable.


Components of Docker


Docker has the following components

  • Docker for Mac − It allows one to run Docker containers on the Mac OS.

  • Docker for Linux − It allows one to run Docker containers on the Linux OS.

  • Docker for Windows − It allows one to run Docker containers on the Windows OS.

  • Docker Engine − It is used for building Docker images and creating Docker containers.

  • Docker Hub − This is the registry which is used to host various Docker images.

  • Docker Compose − This is used to define applications using multiple Docker containers.


We will discuss all these components in detail in the subsequent chapters.

The official site for Docker is https://www.docker.com/ .The site has all information and documentation about the Docker software. It also has the download links for various operating systems.


In next tutorial we will see installation of docker on linux.

Stay Tuned!

Post a Comment

0 Comments