Docker — What, Why & How

Himanshu Itoria
3 min readDec 14, 2023

--

We all went through struggles of installing software and getting them to hit the ground running be it the version issue, some files being missing or your Windows/ Mac not supporting a thing or two. Now that’s an issue not just the end users face but also the development teams around the world when they are trying and developing software, piling up one on top of the other.

What is Docker?

Docker is a platform for developing, building, and running applications in containers. Containers are isolated environments where all requirements are met for the piece of code to run as if it's running on the OS. All services are implemented using docker image, which is kind of similar to zip files but with the environment that allows us to run the application as expected, the environment here is basically the configuration files, the required versions of different packages used in the particular service whose image we are going to run. A Container is running an instance of an image, so one can run multiple instances of the same image.

Layers of Docker infrastructure

Why does Docker even exist?

Whatsapp provides multiple services =>

~ peer-to-peer chat

~ group chat

~ video calls

~ status uploads

~ file sharing

Now had WhatsApp being developed 4 decades back with let's say all tech stacks available to be built upon, it would be a serious pain! Everything then had to be built together as a single stand-alone application. And as the old men insist “Break your problem in pieces when it's too big to deal with”.

And Docker acts on this very principle! Now with docker WhatsApp can afford to develop each service individually, create its image, run the container, fix the errors, run the individual container again, connect with the other containers again, and deploy.

AND the biggest benefit is that the development team doesn’t need to make changes to the entire application for a single service update, instead makes changes to an individual container and deploys the container again to be a part of the larger ecosystem.

How does Docker work?

Docker basically acts as a virtualization tool where the container creates virtual conditions like the normal monolithic singular application for the service to work for. But this idea of Virtualization is far from new, Hypervisors like VMware virtual box act on a similar basis.

Though the catch is hypervisors basically create an isolated computer device inside your device. It has its own OS, memory being allocated and applications being developed on this OS. Thus hypervisors are costly, at least for the initial setup and can eat up memory as the entire allocated one might not be used. Docker on the other hand uses the OS of the host machine itself and virtualizes the application i.e. creating the docker image for the individual service and deploying as a Container. It uses the kernels from the host OS itself.

Those are brief insights into the world of Docker and how really enterprises go on utilizing it.

Cheerios!

--

--