Docker Basics

Lesson 2 of 6

Summoning Your First Creature

Concept:

The 'docker run' command creates and starts a container from an image. If the image isn't available locally, Docker automatically downloads it from Docker Hub (a public registry of images). 'docker ps' shows running containers. Real-world use: spin up a web server, database, or any tool in seconds — no installation required.
Old Wizard Dockerus: Now that we know our tools work, it's time to summon your very first creature! The incantation is 'docker run' followed by the creature's true name.
Apprentice: What creature shall I summon, Master?
Old Wizard Dockerus: Start with the simplest one — 'hello-world'. It's a tiny friendly sprite that appears, delivers a message, and vanishes. Perfect for beginners.
Apprentice: What if I don't have the blueprint for this creature?
Old Wizard Dockerus: Ah, that's the beauty! Docker will fly to the Great Library — called Docker Hub — and fetch the blueprint automatically. Thousands of blueprints live there: web servers, databases, programming languages... all free for the summoning.
Apprentice: So I can summon a whole web server without building it myself?
Old Wizard Dockerus: Indeed! 'docker run nginx' gives you a web server. 'docker run postgres' gives you a database. But first, let's start simple. Summon the hello-world sprite!
Example Code:
docker run hello-world
docker ps
docker images

Your Assignment

Run the classic 'hello-world' container to verify Docker is working end-to-end.

Docker Console
docker>