What is Docker? A Simple Beginner's Guide
Docker in plain English: what a container really is, how it's different from a virtual machine, and why every team ships with it.
Series
Docker from Scratch
What is Docker?
Think of Docker like a shipping container for software. Just like a real shipping container holds anything (clothes, food, cars) and can be moved between trucks, ships and trains without repacking — a Docker container holds your application (code, libraries, settings) and can be moved between laptops, servers and clouds without any surprises.
Container vs Virtual Machine
Virtual Machine Docker Container
+----------------+ +----------------+
| App | | App |
| Libraries | | Libraries |
| Guest OS | <-- heavy +----------------+
| Hypervisor | | Docker Engine |
| Host OS | | Host OS |
+----------------+ +----------------+
GB in size, minutes to boot MB in size, seconds to boot
A VM has its own operating system. A container shares the host OS kernel — that's why it's small and starts in a second.
The 5 words you must know
| Word | Meaning in plain English |
|---|---|
| Image | A blueprint for a container (like a class in code). |
| Container | A running copy of that image (like an object). |
| Dockerfile | A text recipe that describes how to build the image. |
| Registry | A place where images live (Docker Hub is the public one). |
| Volume | A folder outside the container where you keep files that must survive restarts. |
Your first three commands
# 1. Download and run an image called "nginx"
docker run -d -p 8080:80 nginx
# 2. See what is running
docker ps
# 3. Stop it
docker stop <container-id>
Open http://localhost:8080 and you've just served a webpage from a container.
Real-world example
Imagine you built a Python app that works on your Mac but crashes on your friend's Windows machine. If you wrap it in a Docker image, both of you (and the production server) run the exact same environment. No more "works on my machine".
Where to learn next
- Read the official Docker docs.
- Try building your own image with a
Dockerfile(next article in this series).
Keep reading
You may also like
devops
Git Handbook – Quick Reference
A complete collection of Git commands and notes, covering setup, commits, branching, merging, conflicts, and advanced workflows. This handbook is designed as a simple, step‑by‑step guide for beginners and professionals to quickly learn and apply Git in real projects.
devops
Kubernetes Explained for Absolute Beginners
The clearest possible introduction to Kubernetes — what it is, why it exists, and the seven words you need to know.
devops
The Perfect Dockerfile for Node.js Apps
Multi-stage builds, layer caching and a 90% smaller image size.
Discussion (0)
No comments yet. Be the first to weigh in.