Understanding Containers Through Virtual Machines
As a former 3D Animator with more than 12 years of experience, I have always been fascinated by the intersection of technology and creativity. That's why I recently shifted my career towards MERN stack development and software engineering, where I have been serving since 2021.
With my background in 3D animation, I bring a unique perspective to software development, combining creativity and technical expertise to build innovative and visually engaging applications. I have a passion for learning and staying up-to-date with the latest technologies and best practices, and I enjoy collaborating with cross-functional teams to solve complex problems and create seamless user experiences.
In my current role as a MERN stack developer, I have been responsible for developing and implementing web applications using MongoDB, Express, React, and Node.js. I have also gained experience in Agile development methodologies, version control with Git, and cloud-based deployment using platforms like Heroku and AWS.
I am committed to delivering high-quality work that meets the needs of both clients and end-users, and I am always seeking new challenges and opportunities to grow both personally and professionally.
Introduction
In our journey to deploy applications using Docker, it’s crucial to understand what a container is. To grasp this concept, let’s first explore a related technology: Virtual Machines (VMs).

What is a Virtual Machine?
A Virtual Machine (VM) is software that emulates a computer system, allowing you to run another operating system (OS) on top of your existing one. Popular VM software includes:
VMware
VirtualBox
Parallels
For instance, you can run Windows 10 on a Mac OS machine using a VM. Here, Windows 10 is the guest OS, running in a sandboxed environment, isolated from the host OS (Mac OS). This isolation ensures that unless explicitly allowed, the guest OS cannot access the host’s files and programs.
How Do Virtual Machines Work?
Infrastructure: This is your physical machine, which could be a server, a cloud instance, or a personal laptop.
Hypervisor: A layer of software (or sometimes hardware) that allows multiple OSs to run on the same physical machine.
Type 1 Hypervisor: Runs directly on the hardware.
Type 2 Hypervisor: Runs on top of an existing OS.
The hypervisor manages the creation and operation of VMs, ensuring each operates independently. This setup allows a single physical machine to run multiple isolated environments simultaneously.
Benefits of Virtual Machines
Isolation: Each VM operates independently, providing a secure and isolated environment.
Flexibility: Run different OSs side-by-side on the same hardware.
Resource Utilization: Share physical resources efficiently, allowing multiple users or applications to run on the same hardware.
Virtual Machines and the Cloud
The concept of VMs revolutionized cloud computing. Amazon Web Services (AWS) utilizes VMs in its Elastic Compute Cloud (EC2) service, enabling:
Multiple users to share a single powerful physical server.
Each user’s applications to run in isolated environments, ensuring security and stability.
Many well-known services like Netflix and Reddit host their applications on AWS EC2 servers, leveraging the scalability and reliability of VMs.

Moving Toward Containers
While VMs provide a robust way to run isolated environments, containers offer a more lightweight and efficient solution. Containers share the host OS kernel, making them faster and more resource-efficient than VMs.
In the next section, we’ll delve into how containers differ from VMs and why they are becoming the preferred method for deploying applications.