feat(root04): author Containers & Docker
Adds all 8 ROOT 04 modules (why containers exist, images & containers, Docker CLI, container networking, container storage, Dockerfile & image build, Docker Compose, containers → Kubernetes) — 43 activities, using the nested Docker Engine Phase 6D built and tested. Modules 1, 2, and 8 are conceptual (no lab by design) — the honest bridge module (M8) explicitly names what Kubernetes adds beyond what this course already taught, without re-teaching Kubernetes itself. Adds 5 new hands-on Docker scenarios plus 2 MCQs, all against the real nested Docker Engine: docker-cli-basics (run/exec/inspect a real container), docker-container-networking (a genuine "works internally, unreachable from host" port-publishing failure, diagnosed and fixed by recreating the container with the correct `-p` flag), docker-container-storage (a real destroy/recreate cycle proving named-volume persistence, not just described), docker-build-image (a real Dockerfile, a real build, a real custom image run), and docker-compose-multiservice (a real two-service Compose application with a real published port). All tested end-to-end via the real scenario-validation API, including negative tests. Wires rootnode-containers-assessment (2 required + 4 random-draw scenarios) using the existing Phase 3B assessment engine. This completes the entire ROOT_ Foundations sequence (ROOT 01-04) — see docs/PHASE6E_ROOT_FOUNDATIONS_COMPLETION.md. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
-- Phase 6E — ROOT 04: Containers & Docker. Adds 8 modules/activities under the existing
|
||||
-- (PLANNED, zero-content) root-04-containers-and-docker course row. Every lab activity uses the
|
||||
-- nested Docker Engine built and tested in Phase 6D (docs/ROOT_FOUNDATIONS_LAB_STRATEGY.md §3)
|
||||
-- via the existing generic scenario/validation engine — no new mechanism, no runtime redesign.
|
||||
-- Modules 1, 2, and 8 are conceptual (no lab), matching the flexible readiness standard already
|
||||
-- used throughout ROOT 01-03.
|
||||
|
||||
UPDATE courses SET
|
||||
status = 'ready',
|
||||
objectives = '{"Explain what problem containers solve and how they differ from VMs","Distinguish images from containers precisely","Use the core Docker CLI fluently","Diagnose and fix a real container networking failure","Prove data persistence with a real destroy/recreate cycle","Write a Dockerfile and build a real image","Run a real multi-service application with Compose","Explain what Kubernetes adds on top of what Docker already solves"}',
|
||||
updated_at = now()
|
||||
WHERE course_id = 'root-04-containers-and-docker';
|
||||
|
||||
INSERT INTO course_modules (module_id, course_id, title, description, sequence, objectives, prerequisites, estimated_duration_minutes, status) VALUES
|
||||
('root-04-m01-why-containers-exist', 'root-04-containers-and-docker', 'Why Containers Exist',
|
||||
'"It works on my machine," dependency inconsistency, and VM vs. container. Target learner: has completed ROOT 03. No lab — motivational/conceptual opener.',
|
||||
1, '{"Explain the dependency-inconsistency problem containers solve","Explain the real architectural difference between a VM and a container"}', '{}', 25, 'ready'),
|
||||
('root-04-m02-images-and-containers', 'root-04-containers-and-docker', 'Images & Containers',
|
||||
'The single most important distinction in this course: image (artifact) vs. container (running instance). No lab — conceptual model before hands-on commands.',
|
||||
2, '{"State the image/container distinction precisely","Explain layers, registries, repositories, and tags"}', '{root-04-m01-why-containers-exist}', 35, 'ready'),
|
||||
('root-04-m03-docker-cli', 'root-04-containers-and-docker', 'Docker CLI',
|
||||
'pull/run/ps/logs/exec/inspect/stop/rm — each mapped directly to a ROOT 01/02 Linux concept already known.',
|
||||
3, '{"Run, inspect, and exec into a real container","Distinguish docker run from docker exec","Stop and remove containers correctly"}', '{root-04-m02-images-and-containers}', 40, 'ready'),
|
||||
('root-04-m04-container-networking', 'root-04-containers-and-docker', 'Container Networking',
|
||||
'ROOT 02''s networking model, one layer up: container IPs, name-based DNS, and port publishing. Diagnose a real "works internally, unreachable externally" failure.',
|
||||
4, '{"Explain container-to-container name resolution","Explain what port publishing actually does","Diagnose and fix a real port-publishing failure"}', '{root-04-m03-docker-cli}', 45, 'ready'),
|
||||
('root-04-m05-container-storage', 'root-04-containers-and-docker', 'Container Storage',
|
||||
'The disposable writable layer, bind mounts, and named volumes — proven with a real destroy/recreate cycle, not just described.',
|
||||
5, '{"Explain why container data is disposable by default","Distinguish bind mounts from named volumes","Prove data persistence with a real destroy/recreate test"}', '{root-04-m04-container-networking}', 40, 'ready'),
|
||||
('root-04-m06-dockerfile-and-image-build', 'root-04-containers-and-docker', 'Dockerfile & Image Build',
|
||||
'Write a real Dockerfile, understand layer caching, and build a real image.',
|
||||
6, '{"Write a working Dockerfile using FROM/WORKDIR/COPY/RUN/CMD","Explain layer caching and instruction ordering","Build and run a real custom image"}', '{root-04-m05-container-storage}', 45, 'ready'),
|
||||
('root-04-m07-docker-compose', 'root-04-containers-and-docker', 'Docker Compose',
|
||||
'Describe and run a real multi-service application declaratively.',
|
||||
7, '{"Write a Compose file with multiple services","Explain what depends_on does and does not guarantee","Run and verify a real two-service application"}', '{root-04-m06-dockerfile-and-image-build}', 40, 'ready'),
|
||||
('root-04-m08-containers-to-kubernetes', 'root-04-containers-and-docker', 'Containers → Kubernetes',
|
||||
'The explicit bridge module: what Kubernetes adds on top of what Docker already solves. No lab — the honest, deliberate close of the ROOT_ Foundations sequence.',
|
||||
8, '{"Explain what Kubernetes adds beyond single-machine container orchestration","Articulate why Kubernetes exists, in one''s own words"}', '{root-04-m07-docker-compose}', 30, 'ready')
|
||||
ON CONFLICT (module_id) DO NOTHING;
|
||||
|
||||
INSERT INTO module_activities (activity_id, module_id, sequence, activity_type, title, content_path, scenario_id, assessment_definition_id, completion_behavior, estimated_duration_minutes, status) VALUES
|
||||
-- M01 (no lab, no guided)
|
||||
('root-04-m01-a01-lesson', 'root-04-m01-why-containers-exist', 1, 'lesson', 'Why Containers Exist',
|
||||
'content/root/root-04-containers-and-docker/m01-why-containers-exist/01-lesson-why-containers-exist.md', NULL, NULL, 'manual_marker', 12, 'ready'),
|
||||
('root-04-m01-a02-demonstration', 'root-04-m01-why-containers-exist', 2, 'demonstration', 'Demonstration: What "Shares the Host Kernel" Actually Looks Like',
|
||||
'content/root/root-04-containers-and-docker/m01-why-containers-exist/02-demonstration-shared-kernel-vs-full-vm.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m01-a03-knowledge-check', 'root-04-m01-why-containers-exist', 3, 'knowledge_check', 'Knowledge Check: Why Containers Exist',
|
||||
'content/root/root-04-containers-and-docker/m01-why-containers-exist/03-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m01-a04-reflection', 'root-04-m01-why-containers-exist', 4, 'reflection', 'Reflection: You Now Know What Problem You''re About to Solve, Hands-On',
|
||||
'content/root/root-04-containers-and-docker/m01-why-containers-exist/04-reflection.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
-- M02 (no lab)
|
||||
('root-04-m02-a01-lesson', 'root-04-m02-images-and-containers', 1, 'lesson', 'Images and Containers',
|
||||
'content/root/root-04-containers-and-docker/m02-images-and-containers/01-lesson-images-and-containers.md', NULL, NULL, 'manual_marker', 15, 'ready'),
|
||||
('root-04-m02-a02-demonstration', 'root-04-m02-images-and-containers', 2, 'demonstration', 'Demonstration: One Image, Many Independent Containers',
|
||||
'content/root/root-04-containers-and-docker/m02-images-and-containers/02-demonstration-one-image-many-containers.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m02-a03-knowledge-check', 'root-04-m02-images-and-containers', 3, 'knowledge_check', 'Knowledge Check: Images and Containers',
|
||||
'content/root/root-04-containers-and-docker/m02-images-and-containers/03-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m02-a04-guided-exercise', 'root-04-m02-images-and-containers', 4, 'guided_exercise', 'Guided Exercise: Trace the Counts Through a Sequence of Commands',
|
||||
'content/root/root-04-containers-and-docker/m02-images-and-containers/04-guided-exercise-tracing-image-and-container-counts.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m02-a05-reflection', 'root-04-m02-images-and-containers', 5, 'reflection', 'Reflection: A Small Distinction With Large Consequences',
|
||||
'content/root/root-04-containers-and-docker/m02-images-and-containers/05-reflection.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
-- M03
|
||||
('root-04-m03-a01-lesson', 'root-04-m03-docker-cli', 1, 'lesson', 'Docker CLI',
|
||||
'content/root/root-04-containers-and-docker/m03-docker-cli/01-lesson-docker-cli.md', NULL, NULL, 'manual_marker', 15, 'ready'),
|
||||
('root-04-m03-a02-demonstration', 'root-04-m03-docker-cli', 2, 'demonstration', 'Demonstration: run Creates, exec Reaches In',
|
||||
'content/root/root-04-containers-and-docker/m03-docker-cli/02-demonstration-run-vs-exec.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m03-a03-knowledge-check', 'root-04-m03-docker-cli', 3, 'knowledge_check', 'Knowledge Check: Docker CLI',
|
||||
'content/root/root-04-containers-and-docker/m03-docker-cli/03-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m03-a04-guided-exercise', 'root-04-m03-docker-cli', 4, 'guided_exercise', 'Guided Exercise: Which Docker Command Actually Does This?',
|
||||
'content/root/root-04-containers-and-docker/m03-docker-cli/04-guided-exercise-choosing-the-right-docker-command.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m03-a05-lab-cli-basics', 'root-04-m03-docker-cli', 5, 'lab', 'Lab: Run, Exec Into, and Inspect a Real Container',
|
||||
NULL, 'docker-cli-basics', NULL, 'auto_scenario', 12, 'ready'),
|
||||
('root-04-m03-a06-reflection', 'root-04-m03-docker-cli', 6, 'reflection', 'Reflection: The Whole Toolkit Was Already Familiar',
|
||||
'content/root/root-04-containers-and-docker/m03-docker-cli/05-reflection.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
-- M04
|
||||
('root-04-m04-a01-lesson', 'root-04-m04-container-networking', 1, 'lesson', 'Container Networking',
|
||||
'content/root/root-04-containers-and-docker/m04-container-networking/01-lesson-container-networking.md', NULL, NULL, 'manual_marker', 15, 'ready'),
|
||||
('root-04-m04-a02-demonstration', 'root-04-m04-container-networking', 2, 'demonstration', 'Demonstration: Reaching a Container By Name, Not IP',
|
||||
'content/root/root-04-containers-and-docker/m04-container-networking/02-demonstration-container-to-container-by-name.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m04-a03-knowledge-check', 'root-04-m04-container-networking', 3, 'knowledge_check', 'Knowledge Check: Container Networking',
|
||||
'content/root/root-04-containers-and-docker/m04-container-networking/03-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m04-a04-guided-exercise', 'root-04-m04-container-networking', 4, 'guided_exercise', 'Guided Exercise: Diagnose Before You Recreate Anything',
|
||||
'content/root/root-04-containers-and-docker/m04-container-networking/04-guided-exercise-diagnosing-before-fixing.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m04-a05-lab-container-networking', 'root-04-m04-container-networking', 5, 'lab', 'Lab: It Works Inside the Container, But Not From the Host — Why?',
|
||||
NULL, 'docker-container-networking', NULL, 'auto_scenario', 15, 'ready'),
|
||||
('root-04-m04-a06-reflection', 'root-04-m04-container-networking', 6, 'reflection', 'Reflection: Same Diagnosis, New Layer',
|
||||
'content/root/root-04-containers-and-docker/m04-container-networking/05-reflection.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
-- M05
|
||||
('root-04-m05-a01-lesson', 'root-04-m05-container-storage', 1, 'lesson', 'Container Storage',
|
||||
'content/root/root-04-containers-and-docker/m05-container-storage/01-lesson-container-storage.md', NULL, NULL, 'manual_marker', 15, 'ready'),
|
||||
('root-04-m05-a02-demonstration', 'root-04-m05-container-storage', 2, 'demonstration', 'Demonstration: Proving Data Loss, Then Proving Persistence',
|
||||
'content/root/root-04-containers-and-docker/m05-container-storage/02-demonstration-data-loss-then-persistence.md', NULL, NULL, 'manual_marker', 10, 'ready'),
|
||||
('root-04-m05-a03-knowledge-check', 'root-04-m05-container-storage', 3, 'knowledge_check', 'Knowledge Check: Container Storage',
|
||||
'content/root/root-04-containers-and-docker/m05-container-storage/03-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m05-a04-guided-exercise', 'root-04-m05-container-storage', 4, 'guided_exercise', 'Guided Exercise: Predict What Survives Before You Test It',
|
||||
'content/root/root-04-containers-and-docker/m05-container-storage/04-guided-exercise-predicting-what-survives.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m05-a05-lab-container-storage', 'root-04-m05-container-storage', 5, 'lab', 'Lab: Prove Data Survives a Container''s Death — With a Volume',
|
||||
NULL, 'docker-container-storage', NULL, 'auto_scenario', 15, 'ready'),
|
||||
('root-04-m05-a06-reflection', 'root-04-m05-container-storage', 6, 'reflection', 'Reflection: You Proved Persistence, You Didn''t Just Trust It',
|
||||
'content/root/root-04-containers-and-docker/m05-container-storage/05-reflection.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
-- M06
|
||||
('root-04-m06-a01-lesson', 'root-04-m06-dockerfile-and-image-build', 1, 'lesson', 'Dockerfile and Image Build',
|
||||
'content/root/root-04-containers-and-docker/m06-dockerfile-and-image-build/01-lesson-dockerfile-and-image-build.md', NULL, NULL, 'manual_marker', 18, 'ready'),
|
||||
('root-04-m06-a02-demonstration', 'root-04-m06-dockerfile-and-image-build', 2, 'demonstration', 'Demonstration: Watching Layer Caching Actually Work',
|
||||
'content/root/root-04-containers-and-docker/m06-dockerfile-and-image-build/02-demonstration-layer-caching-in-action.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m06-a03-knowledge-check', 'root-04-m06-dockerfile-and-image-build', 3, 'knowledge_check', 'Knowledge Check: Dockerfile and Image Build',
|
||||
'content/root/root-04-containers-and-docker/m06-dockerfile-and-image-build/03-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m06-a04-guided-exercise', 'root-04-m06-dockerfile-and-image-build', 4, 'guided_exercise', 'Guided Exercise: Order These Instructions for Maximum Cache Efficiency',
|
||||
'content/root/root-04-containers-and-docker/m06-dockerfile-and-image-build/04-guided-exercise-ordering-instructions-for-cache-efficiency.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m06-a05-lab-build-image', 'root-04-m06-dockerfile-and-image-build', 5, 'lab', 'Lab: Write a Real Dockerfile and Build a Real Image',
|
||||
NULL, 'docker-build-image', NULL, 'auto_scenario', 15, 'ready'),
|
||||
('root-04-m06-a06-reflection', 'root-04-m06-dockerfile-and-image-build', 6, 'reflection', 'Reflection: You Built a Real Image, Not Just Ran Someone Else''s',
|
||||
'content/root/root-04-containers-and-docker/m06-dockerfile-and-image-build/05-reflection.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
-- M07
|
||||
('root-04-m07-a01-lesson', 'root-04-m07-docker-compose', 1, 'lesson', 'Docker Compose',
|
||||
'content/root/root-04-containers-and-docker/m07-docker-compose/01-lesson-docker-compose.md', NULL, NULL, 'manual_marker', 15, 'ready'),
|
||||
('root-04-m07-a02-demonstration', 'root-04-m07-docker-compose', 2, 'demonstration', 'Demonstration: One File, Two Containers, One Network — Automatically',
|
||||
'content/root/root-04-containers-and-docker/m07-docker-compose/02-demonstration-one-file-two-services.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m07-a03-knowledge-check', 'root-04-m07-docker-compose', 3, 'knowledge_check', 'Knowledge Check: Docker Compose',
|
||||
'content/root/root-04-containers-and-docker/m07-docker-compose/03-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m07-a04-guided-exercise', 'root-04-m07-docker-compose', 4, 'guided_exercise', 'Guided Exercise: Translate a Compose File Back Into Plain docker run',
|
||||
'content/root/root-04-containers-and-docker/m07-docker-compose/04-guided-exercise-translating-compose-to-run-commands.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
('root-04-m07-a05-lab-compose-multiservice', 'root-04-m07-docker-compose', 5, 'lab', 'Lab: Run a Real Two-Service Application With Compose',
|
||||
NULL, 'docker-compose-multiservice', NULL, 'auto_scenario', 15, 'ready'),
|
||||
('root-04-m07-a06-reflection', 'root-04-m07-docker-compose', 6, 'reflection', 'Reflection: A Real Multi-Service Application, Described and Running',
|
||||
'content/root/root-04-containers-and-docker/m07-docker-compose/05-reflection.md', NULL, NULL, 'manual_marker', 8, 'ready'),
|
||||
-- M08 (no lab, no demo, no guided — bridge module)
|
||||
('root-04-m08-a01-lesson', 'root-04-m08-containers-to-kubernetes', 1, 'lesson', 'Containers → Kubernetes',
|
||||
'content/root/root-04-containers-and-docker/m08-containers-to-kubernetes/01-lesson-containers-to-kubernetes.md', NULL, NULL, 'manual_marker', 15, 'ready'),
|
||||
('root-04-m08-a02-knowledge-check', 'root-04-m08-containers-to-kubernetes', 2, 'knowledge_check', 'Knowledge Check: Containers → Kubernetes',
|
||||
'content/root/root-04-containers-and-docker/m08-containers-to-kubernetes/02-knowledge-check.md', NULL, NULL, 'manual_marker', 5, 'ready'),
|
||||
('root-04-m08-a03-reflection', 'root-04-m08-containers-to-kubernetes', 3, 'reflection', 'Reflection: You''re Ready, By Design, Not By Accident',
|
||||
'content/root/root-04-containers-and-docker/m08-containers-to-kubernetes/03-reflection.md', NULL, NULL, 'manual_marker', 10, 'ready')
|
||||
ON CONFLICT (activity_id) DO NOTHING;
|
||||
|
||||
-- ═══════════════════════════════════════════════════════════════════════════════════════════
|
||||
-- ROOT 04 course assessment — mixes real Docker-state-validation tasks with knowledge-recall
|
||||
-- MCQs reasoning about image/container distinction and port-publishing failures, via the
|
||||
-- existing Phase 3B engine.
|
||||
-- ═══════════════════════════════════════════════════════════════════════════════════════════
|
||||
INSERT INTO assessment_definitions (assessment_definition_id, type, title, description, duration_minutes, hint_policy, pool_spec, completion_rule)
|
||||
VALUES (
|
||||
'rootnode-containers-assessment', 'exam', 'ROOT 04 Containers & Docker Assessment',
|
||||
'A timed check across the Docker CLI, container networking/storage diagnosis, image builds, and Compose — combining real container-state-validation tasks with conceptual reasoning questions.',
|
||||
40, 'disabled',
|
||||
'{"required": ["docker-cli-basics", "docker-build-image"],
|
||||
"random": [
|
||||
{"count":2,"from":["docker-container-networking","docker-container-storage","docker-compose-multiservice"]},
|
||||
{"count":2,"from":["docker-image-vs-container-mcq","docker-port-publish-mcq"]}
|
||||
]}',
|
||||
'{"type":"all_scenarios_passed"}'
|
||||
) ON CONFLICT (assessment_definition_id) DO NOTHING;
|
||||
|
||||
INSERT INTO module_activities (activity_id, module_id, sequence, activity_type, title, content_path, scenario_id, assessment_definition_id, completion_behavior, estimated_duration_minutes, status) VALUES
|
||||
('root-04-m08-a04-assessment', 'root-04-m08-containers-to-kubernetes', 4, 'assessment', 'ROOT 04 Containers & Docker Assessment', NULL, NULL, 'rootnode-containers-assessment', 'auto_assessment', 40, 'ready')
|
||||
ON CONFLICT (activity_id) DO NOTHING;
|
||||
Reference in New Issue
Block a user