Learn Docker by doing โ in a real terminal, in your browser.
DockerMissions is a fully local, browser-based training game for Docker. Each mission gives you a live shell, a clear objective, and automatic validation. No cloud. No costs. No copy-pasting from a blog post.
54 progressive challenges across 8 modules โ complete beginner to production patterns.
Design and implementation by: Fatemeh
- ๐ณ 54 missions across 8 modules โ containers, images, networks, volumes, Compose, security, registries, and advanced Docker
- ๐ XP & progression system โ earn points, unlock levels, rise through operator tiers
- ๐ก Progressive hints โ reveal only what you need, with XP deduction after the first hint
- โ Instant automated validation โ click Check Mission and get a real result in seconds
- ๐ Smart error analysis โ detects syntax mistakes and wrong flag ordering with a corrected example
- ๐ฅ๏ธ In-browser terminal โ real bash session connected to a live Docker environment
- ๐ Badges โ awarded per module completion and XP milestones
- ๐ Leaderboard โ track top pilots by XP
- ๐พ Offline player profiles โ no account needed, progress saved locally
git clone <repo-url>
cd dockermissions
# Install dependencies
cd backend && npm install && cd ..
cd frontend && npm install && cd ..
# Generate mission data
node scripts/generate-missions.mjs
# Start both services
./start.shOpen http://localhost:5173, enter a player name, and pick your first mission.
| Tool | Version | Notes |
|---|---|---|
| Node.js | 18+ | Required for backend and frontend |
| Docker | 24+ | Must be running for live validation |
| npm | 9+ | Included with Node.js |
- Open
http://localhost:5173 - Enter a player name in the right panel to start your offline profile
- Select a mission from the campaign map on the left
- Read the briefing โ understand the objective and starting state
- Use the terminal โ run real Docker commands to complete the mission
- Click
Check Missionโ automated validation runs against the live Docker state - Earn XP and unlock the next level
| # | Module | Levels | XP | Difficulty | Key Topics |
|---|---|---|---|---|---|
| 1 | ๐ข Docker Basics | 8 | 450 | Beginner | docker run, ports, env vars, exec, logs |
| 2 | ๐ข Images & Dockerfile | 8 | 650 | Beginner | FROM, RUN, COPY, multi-stage, .dockerignore |
| 3 | ๐ก Networking | 7 | 600 | Intermediate | Bridge, custom networks, DNS, host, none |
| 4 | ๐ก Volumes & Storage | 6 | 500 | Intermediate | Named volumes, bind mounts, tmpfs, backups |
| 5 | ๐ก Docker Compose | 7 | 600 | Intermediate | Multi-service stacks, health checks, scaling |
| 6 | ๐ด Security | 6 | 750 | Advanced | Non-root, read-only rootfs, capabilities, seccomp |
| 7 | ๐ด Registry & Distribution | 5 | 450 | Advanced | Tagging, local registry, push/pull, layer history |
| 8 | โซ Advanced Docker | 7 | 1000 | Expert | BuildKit, Swarm, contexts, cache mounts, prune |
When validation fails, DockerMissions analyses the commands you typed and flags common mistakes:
Command issue detected:
Flags after the image name are passed to the container, not Docker.
You wrote: docker run -d nginx --name webserver
Move --name before the image name.
Example: docker run -d --name webserver nginx
Detected patterns include:
- Docker flags placed after the image name
- Wrong
-p HOST:CONTAINERformat - Missing
-dflag when detached mode is required docker execwithout-itwhen opening a shelldocker buildwithout a-ttag
| Script | What it does |
|---|---|
./start.sh |
Start backend + frontend in the background |
./stop.sh |
Stop both services |
./restart.sh |
Stop then start |
Logs go to tmp/logs/backend.log and tmp/logs/frontend.log.
dockermissions/
โโโ start.sh / stop.sh / restart.sh โ service management
โโโ backend/
โ โโโ missions/data/ โ generated mission JSON (54 levels)
โ โโโ src/
โ โโโ data/ โ offline player progress (JSON on disk)
โ โโโ missions/ โ mission loader and parser
โ โโโ sandbox/ โ session and workspace lifecycle
โ โโโ terminal/ โ WebSocket PTY relay (node-pty)
โ โโโ validation/ โ mission validation + error analysis
โ โโโ routes/ โ Express API routes
โโโ frontend/
โ โโโ src/
โ โโโ components/ โ UI components (terminal, briefing, hintsโฆ)
โ โโโ api/ โ typed API clients
โ โโโ pages/ โ MissionPage layout
โ โโโ store/ โ Zustand game state
โ โโโ styles/ โ global CSS (dark terminal theme)
โโโ docker/
โ โโโ sandbox/ โ sandbox Dockerfile
โโโ modules/ โ source-of-truth mission specs (Markdown)
โ โโโ module_01_basics.md
โ โโโ module_02_images_dockerfile.md
โ โโโ module_03_networking.md
โ โโโ module_04_volumes_storage.md
โ โโโ module_05_docker_compose.md
โ โโโ module_06_security.md
โ โโโ module_07_registry.md
โ โโโ module_08_advanced.md
โโโ scripts/
โ โโโ generate-missions.mjs โ parse modules/ โ backend/missions/data/
โโโ GAME_PLAN.md โ full design document
โโโ AI_IMPLEMENTATION_PROMPT.md โ implementation spec for AI assistants
After editing any file in modules/, regenerate the mission JSON:
node scripts/generate-missions.mjsThen restart the backend to pick up the changes.
- React 18 + TypeScript + Vite
- xterm.js (terminal emulator with PTY resize support)
- Zustand (state management)
- Inter + JetBrains Mono (via Google Fonts)
- Node.js + Express + TypeScript (ESM)
- node-pty (real PTY, not pipe โ gives a proper interactive shell)
- ws (WebSocket server)
- File-backed JSON store (no database required)
- Host Docker socket for live container/image/network/volume validation
- Per-session workspace directories with automatic cleanup (30-minute TTL)
- Command log with syntax analysis for actionable error messages
To add or change missions:
- Edit the relevant file in
modules/ - Regenerate:
node scripts/generate-missions.mjs - Test the mission flow in the UI
To change validation logic:
- Edit
backend/src/validation/ValidationEngine.ts - All check types are documented in
GAME_PLAN.md
To report a bug or suggest a new mission:
- Open an issue with the mission ID and what you expected vs. what happened
If DockerMissions helped you learn Docker:
- ๐ Star this repo โ helps others discover it
- ๐ Open an issue โ report bugs or suggest new levels
- ๐ค Contribute โ new missions, validation checks, UI improvements
MIT License.