Docker Basics

Lesson 1 of 6

The Wizard's Container Spell

Concept:

Docker is a tool that packages applications into containers β€” lightweight, portable environments that run the same everywhere. The key mental model: Dockerfile (recipe) β†’ Image (template) β†’ Container (running instance). Think of it like Java: .java file β†’ .class file β†’ running in JVM.
Old Wizard Dockerus: Come, young apprentice. Sit by the fire. Today I shall teach you the most powerful spell in all the land β€” the art of Containerization.
Apprentice: Containerization? That sounds... complicated, Master.
Old Wizard Dockerus: Not at all! Think of it this way. When a baker wants to share a recipe, they don't ship their entire kitchen. They write down the recipe, anyone can recreate the cake. That's Docker.
Apprentice: So Docker is like... a magic recipe book?
Old Wizard Dockerus: Precisely! Three steps, child. First, you write a Spell Scroll β€” that's your Dockerfile. Then you enchant it into a Blueprint β€” that's your Image. Finally, you summon a living Creature from the blueprint β€” that's your Container!
Apprentice: Spell Scroll β†’ Blueprint β†’ Creature. I think I understand!
Old Wizard Dockerus: Before we cast any spells, let us first check that our magical tools are ready. Speak the incantation 'docker --version' into the crystal console below.
Example Code:
docker --version

Your Assignment

Check that Docker is installed by running the version command.

Docker Console
docker>