with one click
cleanup
// Clean up Docker resources created by the Learn Docker & K8s game. Removes all learn-* containers, networks, volumes, and images. Use when the user wants to clean up, reset, or free disk space.
// Clean up Docker resources created by the Learn Docker & K8s game. Removes all learn-* containers, networks, volumes, and images. Use when the user wants to clean up, reset, or free disk space.
Start or resume the Learn Docker & K8s interactive game. Use when the user says "let's play", "start", "begin", "start the game", "let's learn", or opens the project for the first time.
Show the player's current progress in Learn Docker & K8s. Displays completed chapters, current position, and overall stats. Use when the user asks "where am I", "what have I done", "show progress", or "status".
Monitor player engagement and adapt the learning experience. Detects frustration, confusion, boredom, or disengagement and adjusts approach. Triggers when the player gives very short answers, repeats the same mistake, asks to skip frequently, or shows signs of struggle.
Check if the system is ready for the Learn Docker & K8s game. Verifies Docker, Docker Compose, kubectl, kind, disk space, and port availability. Use when the user asks about requirements, setup, or environment issues.
Get a hint for the current challenge in Learn Docker & K8s. Provides progressive hints (1=direction, 2=specific, 3=near-answer). Use when the user is stuck, asks for help, says "hint", "help me", "I'm stuck", or "I don't know what to do".
Move to the next lesson or challenge in Learn Docker & K8s. Use when the user says "next", "continue", "move on", "what's next", or finishes a lesson/challenge.
| name | cleanup |
| description | Clean up Docker resources created by the Learn Docker & K8s game. Removes all learn-* containers, networks, volumes, and images. Use when the user wants to clean up, reset, or free disk space. |
| disable-model-invocation | true |
| argument-hint | [chapter|all] |
This is a destructive operation. Always confirm with the player first.
echo "=== Containers ==="
docker ps -a --filter "label=app=learn-docker-k8s" --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"
echo ""
echo "=== Networks ==="
docker network ls --filter "label=app=learn-docker-k8s" --format "table {{.Name}}\t{{.Driver}}"
echo ""
echo "=== Volumes ==="
docker volume ls --filter "label=app=learn-docker-k8s" --format "table {{.Name}}\t{{.Driver}}"
echo ""
echo "=== Images ==="
docker images --filter "reference=learn-*" --format "table {{.Repository}}:{{.Tag}}\t{{.Size}}"
Show the player what will be removed and ask for confirmation.
If $ARGUMENTS is a specific chapter (e.g., "ch01", "ch03"):
If $ARGUMENTS is "all" or empty:
bash engine/cleanup.shkind get clusters 2>/dev/null | grep learnAfter confirmation, execute the cleanup and report what was removed.
If they're in the middle of a chapter, warn them: "You have in-progress work in Chapter X. Cleaning up means you'll need to redo the challenges. Continue?"
If cleaning a specific chapter, update .player/progress.yaml: