Understanding the Core Foundation of Containers and Docker — My Simple Notes

Madin BlochMadin Bloch
3 min read

Recently I started learning Docker and Kubernetes for Beginners by hitesh choudhary and piyush sachdeva I want to share what I’ve learned in my simple words so I (and maybe you) can always refer to it and understand the core foundation of containers.

The Starting Point: Physical Servers

Every computer has some basic hardware:

  • CPU (processor)

  • RAM (memory)

  • Disk (storage)

  • Network Devices (for internet and other communication)

In old days (and still now), when we installed an application, it used the whole server. But what if I want to run multiple applications on the same server? That’s where problems started. Some resources remain unused, and some apps may crash if one app takes more power.

The Solution: Virtual Machines (VMs)

To solve this, Virtual Machines were introduced.
A Virtual Machine is like creating multiple small computers inside one big computer.

For this, we use something called Hypervisor — you can think of Hypervisor like a manager that divides the main physical resources (CPU, RAM, Disk) and gives each VM its own piece.
Each VM has:

  • Its own operating system (Windows, Linux, etc.)

  • Its own apps

  • Its own dependencies

This is good, but VMs take a lot of space because every VM needs its full OS to work. Also, if we want to create a new VM for high user load, it takes time: install OS, set up everything, and only then the app runs. This becomes slow when we need quick scaling.

The New Way: Containers

Here comes the hero: Containers.

Many people think Docker = Containers, but that’s not fully true. Docker is just one tool that helps us use containers easily.

Containers don’t need full OS for each app.
Instead:

  • The main server OS is shared.

  • Each container only has the app and the stuff that app needs to run (called dependencies).

  • This makes containers very small, light, and super fast to start.

So, when user load increases, we can start a new container within seconds.

Here, the simple diagram of both VM vs Containers

Why Docker?

Docker made it super easy to work with containers.

  • Docker creates Images — think of it like a ready-made box with everything packed inside.

  • Once you create an image, you can run it anywhere (your laptop, server, cloud) — it works exactly the same.

  • No more “It works on my machine” problem 😄

Small Example to Imagine:

Imagine you are delivering food.

This is Simple Example that i used to understanding VMs and Container

  • Virtual Machine is like setting up a full kitchen every time you deliver an order.

  • Container is like preparing the food in one kitchen, pack it in a box, and just deliver the box. Wherever the box goes, food is ready to eat!

Where Containers Run?

Today, almost every cloud supports containers:

  • AWS

  • Google Cloud

  • Azure

  • Oracle Cloud
    and many more…

Also, Kubernetes is used when you have many containers and you want to manage them automatically.

Conclusion

Containers are a smart way to run applications fast, light, and portable.
Docker makes it simple for developers.
Virtual Machines are still used when full isolation is required, but containers are taking over for modern cloud-based applications.

I hope this helps me (and you) to remember the core foundation of containers in simple words 😄

Special Thanks

Big thanks to hitesh choudhary Sir they made this super easy for me to understand.

0
Subscribe to my newsletter

Read articles from Madin Bloch directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Madin Bloch
Madin Bloch