Introduction to Docker

Chathushka Hansani
Aeturnum
Published in
6 min readFeb 16, 2018

“What is Docker ??” is the most basic question to ask, with the Title given above. But before knowing the answer for above question you should know “What is a container ??” :)

A brief about Containers

  • Container is a standardized unit of software package for development, shipment and deployment which is a lightweight, stand-alone, and executable package of a piece of a software that includes everything needed to run it, i.e.: code, runtime, system tools, system libraries, and settings. Containers are available for many platforms like Linux, MacOS and Windows. Containerized software will always run the same, regardless of the environment.
  • Multiple containers can run on the same machine and share the Operating System with each other, each of those containers will run as isolated processes. Containers takes less space than Virtual Machines, and start almost instantly .

Down on the line to containers from the beginning.

1st — Use of Physical servers

2nd — Use of Hypervisor

Now — Use of Containers :)

1st — Use of Physical servers

Image [1] — Use of 3 physical servers.

To run an application using physical servers, we have to use different physical servers like database server, web server, application server, etc. which were necessary to run a complete application. When we use those physical servers,

  • Maintenance cost is high, e.g.: For the maintenance of the servers need of human resources.
  • Space consuming, e.g.: need of space to store multiple physical servers.
  • Need of separate networks.
  • Waste of processing power as we do not use the 100% processing power of each server.

To overcome these issues, Hypervisor was introduced.

2nd — Use of Hypervisor

Image [2] — use of Hypervisor, the virtualized environment.

Please refer Image [2] on the left side and the below steps to get an idea of creating a virtualized environment using the “Hypervisor”.

  • Use a single high processing h/w box.
  • Install the Hypervisor.
  • Create multiple Virtual Machines on top of the Hypervisor.
  • Install the Operating System you want, on top of each Virtual machine.
  • Then Install your application.

Use of Virtual Machines can utilize space and processing power, e.g.: as per the “Image [2]” imagine— VM1 uses 20% of processing power, VM2 uses 10% of processing power, VM3 uses 30% of processing power. All together 60% of processing power has been used. So can use the other 40% of processing power for another server like Mail-server, proxy or load balancer.

Below are some drawbacks of the Hypervisor,

  • Cost is high, e.g.: as per the “Image [2]” imagine — Each virtual machine should installed with an Operating System. Operating System licensing cost, management cost (people to maintain), license management cost comes with each Operating System.
  • Time consuming, e.g.: as per the “Image [2]” imagine — to spin-out another server we need to install Virtual Machines separately and Operating Systems on top of it (instead of installing Virtual Machines separately we can use Virtual Machine image, but it may also need some configurations), and the boot-up process to start each Virtual Machine takes more time, as per the use of separate multiple Virtual Machines.
  • Maintenance problems.

Use of the Hypervisor solved some issues we had when using Physical servers, but then Containers were introduced for more performance and to solve those issues.

Now — Use of Containers

Please refer Image [2] on the left side and the steps below to get an idea of creating a containerized environment using a Docker Engine.

  • Use a single high processing h/w box.
  • Install one Operating System.
  • Install Docker Engine on top of the Operating System.
  • Create containers on top of the Docker Engine created.
  • Then install your application.

Below are some advantages of the containers,

  • Use of one Operating System will solve licensing, patching, maintaining, and license updating problems.
  • Save the space of the memory, e.g.: we do not need separate Operating Systems and Virtual Machines, that saves a lot of space to create more containers.
  • Cost is less compared to the use of Hypervisor, e.g.: without the need of separate Operating Systems solved multiple license purchasing cost, patching cost, and license updating problems for a certain extend.
  • Time optimization when starting the application, e.g.: applications are always running on top of one host Operating System, that makes these applications start very quickly because the host Operating System was already started.

Docker is one of the implementation of containers but containers are way more smaller than Hypervisor, because the Hypervosor is having it’s own Operating System and configurations.

Docker

Now ask the first question again “What is Docker ??”.

“Docker is the world’s leading software containerization platform” is one of the simplest answer to be given.

  • Docker is a product/software which is open source and backed by Apache 2.0 License introduced by Docker Ink company, not the concept called containers.
  • Considering containerization Docker is not the only terminology to use, but the famous one of them all.
  • The Docker platform is known to be the, famous container platform to build, secure and manage the widest array of applications from development to production both on premises (local machine) and in the cloud(AWS).
  • Docker enables true independence between applications, infrastructures and developers, which improves the capacity and creates a model for a better collaboration and innovation.
  • Docker by nature is persistence, whatever changes done using the docker will remain even when you shutdown/start the docker, e.g.: folders made, and the files created using the docker will remain, but whatever the changes did to the docker (installing s/w to docker) won’t exists.
    (for databases it’s advised to use an external storage environment but even on the same storage its fine).
  • Brings traditional applications and micro-services built on Windows, Linux etc. into a single secure software supply chain.

Some specifications of docker

  1. AGILITY — Use of docker increases s/w development and deployment by 13x and respond instantly.
  2. SECURITY —Docker contains built-in security capabilities.
  3. COST SAVINGS — Use of docker saves up-to ~50% in total costs, as per the above explanation of containers.
  4. PORTABILITY — Use of docker removes the concept of “Works on my machine” and gained independence across on premises and cloud environments.

Docker Editions

  1. Docker CE — Docker Community Edition
  • Community edition is ideal for developers and small teams.
  • Community edition helps beginners to get started with Docker, and to experiment with container-based applications.
  • Available for many platforms like desktop, cloud and also for open source operating systems.

2. Docker EE — Docker Enterprise Edition

  • Enterprise edition was designed for enterprise developments and for IT teams who build, ships, and run business critical applications in production at scale, in the terms of “Containers-as-a-Service platform” for IT.
  • Manage and secure diverse applications across different infrastructure (on-premises and cloud both).

Hope you were able to gain some insight on Docker and the evaluation from physical servers to containers.

Wait for the next blog post to see more details about dockers. :)

--

--