The title was the question that kept going through my head the first time I heard the term Containerization. I will demystify what it means and why you should use it as well.
Let us begin from the scratch with the term Virtual Machine(VM) which is simply loading a third-party OS which is known as Guest OS on your current Operating System known as Host OS without having to partition your hard drive. Any software installed in a VM can’t have any effect on your computer and you could spin up as many as you want either using Virtual box or VMWare. Now the downside of this is that each VM created requires its own OS which means its own CPU, RAM and space on your computer which leads to a lot of resources been utilized which quickly adds up to a lot of RAM and CPU cycles.
Now, why Containerization?
Simply put, containerization is just packaging up software code and all its dependencies so that it can run uniformly and consistently on any infrastructure. Imagine a developer transferring code written on a Linux machine to a Windows OS, there is a high tendency of this resulting in an error or dealing with bugs.
Containerization eliminates this problem by bundling the application code together with the related configuration files, libraries, and dependencies required for it to run. This single package is known as A Container
With containers instead of virtualizing the underlying computer like a VM, just the application is virtualized this could be System Application (OS) or User Application (Nginx). They are often referred to as lightweight due to how small in size they can be. For containers, they share the machine’s operating system kernel usually, the binaries and libraries and do not require the overhead of associating an operating system within each application. Due to how small in size they can be, they require less start-up time, allowing far more containers to run on the same compute capacity as a single VM. This drives higher server efficiencies and, in turn, reduces server and licensing costs.
Types of Containerization Technology
There are two containerization technology I am aware of:
1. Linux Containers are also known as LXC (*Never used*)
2. Docker (*PS: Will be explaining more on this in the next post*)
Bringing this to close, Containerization is a lightweight alternative to virtualization that encapsulates an application in a container with its own operating environment.
Let me know if you ever try containerization and feel free to share your experience with me.