Covid-19 may have elaborated some new norms for us like maintaining social distance or isolating ourselves from the rest. But this isn’t the first time the tech world is insisting on distancing. Containers are a lot about isolation, for starters.
As an open source marketer I could not help but draw some parallels between the isolation the world is witnessing today and the isolation containers advocate.
Containerization emphasises on isolation of applications in separate containers so that different applications don’t affect each other in any unfavourable way from the beginning of its inception.
But that does not mean isolated applications don’t interact with each other at all. The isolation of apps provide the security we need while they can still communicate with each other to perform some essential tasks. Like we may be quarantined today in our homes, but we are still connected with our loved ones, neighbours, friends and family digitally or otherwise. So, we may be isolated but we are not disconnected with the outside world, and if you think of it, something very similar is going on with container isolation. For instance, take peripheral applications in banking. The critical workloads of several applications in the banking sector are well isolated in containers while they still interact with each other to achieve desired results.
So, covering some back to basics in my article here:
Let’s take Docker for example. It is a popular tool today being used to run applications in isolated environments. Container isolation ensures:
- The app runs in the same environment. It will work on your computer, on the live server – it will always act the same, everywhere.
- Imagine working on different projects! Docker allows you to sandbox each project and keep them separate for enhanced security and avoiding potential conflicts. Here’s isolation for you all over again!
- No overheads and hassle of running and managing a virtual machine – because we have Containers!
The code, environment and more wrapped inside a Container – in isolation.
So, what is a Container?
Container is a running instance of an image. An image is a template for creating the environment you wanted to snapshot of the system at a particular time. An image contains the operating system, software, application code, all bundled together in a file.
Docker images and Dockerfile
Images are defined using a Dockerfile. A Dockerfile is a text file with a series of steps and commands to create the image. For example, you configure the operating system, install the software you need, copy the project files into the right locations and so on.
Learn more about how to create Docker Images in this video.
Is containerization same as Virtualization?
They do complement each other, but containers and virtualization are not exactly the same.
- Virtualization enables the operating systems to run simultaneously on a single hardware system.
- Containers share the same operating system (Windows or Linux) kernel and isolate the application processes from the rest of the system.
And because virtualization uses a hypervisor to mimic hardware to run multiple operating systems, it isn’t as lightweight as using containers. With limited resources and capabilities, your apps need to be as light as possible.
To begin with, a container is relatively well isolated from other containers. However, you can control how isolated you want a particular container’s network, storage or other subsystems from other containers. Just like the social distancing we are practicing today, where we have to make some exceptions, for example, stepping out to get groceries with all the precautions we must take. Containers also behave in a similar fashion.
Globally, enterprises are adopting container technology in their digital transformation journey. Learn more.
It is advantageous to run applications in containers, as its isolation status helps keep your apps non-conflicted and enables you to run it on any OS. Just like this, isolation is good for us too at the moment, it’s our chance to stay non-conflicted with this virus ;)