Free preview · Beginner · 12 min read
Docker Basics
Understand the problem Docker solves, hypervisors, and containers vs virtual machines.
The Problem Docker Solves
Developers often hear, "it works on my machine". Docker reduces those environment differences by packaging an application with its runtime dependencies.
What is a Hypervisor?
Before containers became common, teams commonly ran applications inside virtual machines. A hypervisor sits between physical hardware and those virtual machines so multiple isolated systems can share the same host.
A cloud example is launching a VM on AWS. You get a full operating system without owning the physical server yourself.

Container vs Virtual Machine
A container shares the host kernel instead of booting a full guest operating system.
| Area | Container | Virtual Machine |
|---|---|---|
| Isolation | Process-level, shared kernel | Hardware-level, separate guest OS |
| Startup speed | Usually seconds or less | Often slower because a full OS boots |
| Footprint | Lightweight | Heavier |
| Portability | Runs anywhere Docker is available | Depends on VM image and hypervisor |

What Docker actually gives you
Docker is a platform for building, shipping, and running applications as containers.
docker version
docker run --rm hello-world
docker ps -a