Let's begin with Docker

In this blog post, I will briefly discuss some of the features and benefits of containerisation and some of the use cases of Docker.

Let's begin with Docker

What is Docker ?

Docker is an open-source container engine. It gives one the ability to package and run applications within a container. Docker can be used for a variety of purposes including, development, testing, deployment, etc.

What is a container and how is it different from a VM?

A container is a lightweight and loosely isolated environment that contains all the required libraries and dependencies to run a particular application or service. Since containers already have all the required dependencies they do not rely on the pre-installed software of the host machine.

Let's understand the difference between a Virtual Machine and a container.

Virtual Machine Container
System Level Virtualisation Operating System Virtualisation
Large Size Light Weight
May take a few minutes to start due to its large size Quick start time due to light weight
More secure because of complete isolation Less secure as they are loosely isolated
VMs are useful when all of the resources of the OS are required Containers are useful when we need to maximise the applications running using minimal compute resources.

Why is Docker useful ?

Ability to run anywhere

  • Building the application within a container doesn't restrict the developer or organisation to just one cloud service provider as they can easily migrate their workloads from one provider to another.
  • Containers can make the testing process quicker. Since the containers contain all the dependencies within themselves, the development and testing teams would be using the same dependency versions making the testing process smooth and quick.

Docker Container images are versioned

  • All Docker container images are versioned making it easier to roll back to a previous version in case there is some problem with the current iteration of the product.
  • Versioning of container images makes Docker the perfect tool for 'Continuous Integration / Continuous Development' or CI/CD

Application segmentation and Scaling

  • Containerisation allows the application to be segmented, making it easier for the maintainers to refresh, clean up and repair.
  • One can divide the application into smaller processes using Docker. These separate processes can then communicate using APIs.
  • Dividing the application into processes also makes it easier to fix issues quickly thus making the system extremely cost-effective and time-saving.

References for this article