What are Containers?

What are Containers?
Play this article

I am sure the first thought that would have come to your mind after listening to the word "Containers" is of the above image :P

The tech sector has adopted Containers to a great extent. Containers are now being used by almost all businesses to deploy microservices. You must be imagining what the f**k Containers are? So let’s start with, What are Containers?

Giving a brief background first because there is so much information available about these topics, that it can become overwhelming. However, it's crucial to comprehend the history and fundamental ideas of this technology.

Assume for a moment that you are using Ubuntu to develop a web service. On your local system, your code runs flawlessly. Your application can be executed on a remote server in your data centre.

You attempt to run your code after copying your local binaries to a distant server. The next thing you notice is that your code is broken there. You'll be interested to learn what transpired.

The aforementioned difficulties result in portability challenges. Debugging environment-specific problems takes a lot of the developer's work. Fixing these problems could take a while, and most developers detest doing it. Therefore, it's imperative to address these issues. It's super common in the software industry to run into problems like: "This works on my computer - I'm not sure why it's not working on yours."

Now here comes the solution - Containerization.

Containerization basically is a way to package an application with all the necessary dependencies and configuration. It is possible to describe it as a lightweight approach to Virtualization. It just offers the minimal necessities for a programme to function. Containers are hypervisor-free, extremely basic Virtual Computers.

But how do Containers function in various settings? By removing the Operating System (OS) and the physical infrastructure, Containerization enables the Containers to run in many settings. The host Operating System's kernel is shared by the Containerized apps and other Containers. It is "read-only" in the common OS area. In certain cases, a container only contains one executable service or microservice.

The above image shows the two types of Containerization Technologies namely Linux Containers (LXC) and Docker. LXC provides a more bare-metal, low-level containerization approach, whereas Docker adds a layer of abstraction, image management, and tooling on top of technologies like LXC. Docker is more application-focused and user-friendly, making it widely adopted for building, shipping, and running containerized applications.

Must be thinking now What is Docker? So Docker is an open-source containerization platform. It is a tool that helps developers package their applications and all their dependencies into a single unit i.e. a "Container", making it easier to develop, deploy, and run software across different environments. More about it in my future articles.

Now wrapping up this article by answering the question, What makes Containers a more compelling option over bare-metal or VMs?

  • Ease of Use: Containers are easier to use, as they do not require any special hardware or software.

  • Flexibility: Containers can be used to run a wide variety of applications, from simple web applications to complex enterprise applications.

  • Scalability: Containers can be easily scaled up or down as needed, which makes them ideal for applications that experience fluctuating demand.

  • Cost-effectiveness: Containers can save money on hardware and software costs, as they do not require the purchase of dedicated servers or hypervisors.

THE END

Thank You for reading this article! I hope you found it informative and insightful. If you enjoyed it, please consider giving it a LIKE and sharing it with others who might benefit from it.

I'm always open to your suggestions and feedback, so feel free to leave your comments and ideas below. Your input is valuable in shaping the content I create. If you have any specific topics you'd like me to cover in my future articles, please let me know. I look forward to hearing from you and continuing this knowledge-sharing journey together!

😊

Did you find this article valuable?

Support Sarthak Kathpalia by becoming a sponsor. Any amount is appreciated!