dojo.md 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/courses/GENERATION_LOG.md +45 -0
  2. package/courses/aws-lambda-debugging/course.yaml +11 -0
  3. package/courses/aws-lambda-debugging/scenarios/level-1/api-gateway-integration.yaml +71 -0
  4. package/courses/aws-lambda-debugging/scenarios/level-1/cloudwatch-logs-basics.yaml +64 -0
  5. package/courses/aws-lambda-debugging/scenarios/level-1/cold-start-basics.yaml +70 -0
  6. package/courses/aws-lambda-debugging/scenarios/level-1/environment-variable-issues.yaml +72 -0
  7. package/courses/aws-lambda-debugging/scenarios/level-1/first-debugging-shift.yaml +73 -0
  8. package/courses/aws-lambda-debugging/scenarios/level-1/handler-import-errors.yaml +71 -0
  9. package/courses/aws-lambda-debugging/scenarios/level-1/iam-permission-errors.yaml +68 -0
  10. package/courses/aws-lambda-debugging/scenarios/level-1/invocation-errors.yaml +72 -0
  11. package/courses/aws-lambda-debugging/scenarios/level-1/lambda-timeout-errors.yaml +65 -0
  12. package/courses/aws-lambda-debugging/scenarios/level-1/memory-and-oom.yaml +70 -0
  13. package/courses/aws-lambda-debugging/scenarios/level-2/async-invocation-failures.yaml +72 -0
  14. package/courses/aws-lambda-debugging/scenarios/level-2/cold-start-optimization.yaml +76 -0
  15. package/courses/aws-lambda-debugging/scenarios/level-2/dynamodb-streams-debugging.yaml +70 -0
  16. package/courses/aws-lambda-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +71 -0
  17. package/courses/aws-lambda-debugging/scenarios/level-2/lambda-concurrency-management.yaml +70 -0
  18. package/courses/aws-lambda-debugging/scenarios/level-2/lambda-layers-debugging.yaml +76 -0
  19. package/courses/aws-lambda-debugging/scenarios/level-2/sam-local-debugging.yaml +74 -0
  20. package/courses/aws-lambda-debugging/scenarios/level-2/sqs-event-source.yaml +72 -0
  21. package/courses/aws-lambda-debugging/scenarios/level-2/vpc-networking-issues.yaml +71 -0
  22. package/courses/aws-lambda-debugging/scenarios/level-2/xray-tracing.yaml +62 -0
  23. package/courses/aws-lambda-debugging/scenarios/level-3/advanced-debugging-shift.yaml +72 -0
  24. package/courses/aws-lambda-debugging/scenarios/level-3/container-image-lambda.yaml +79 -0
  25. package/courses/aws-lambda-debugging/scenarios/level-3/cross-account-invocation.yaml +72 -0
  26. package/courses/aws-lambda-debugging/scenarios/level-3/eventbridge-patterns.yaml +79 -0
  27. package/courses/aws-lambda-debugging/scenarios/level-3/iac-deployment-debugging.yaml +68 -0
  28. package/courses/aws-lambda-debugging/scenarios/level-3/kinesis-stream-processing.yaml +64 -0
  29. package/courses/aws-lambda-debugging/scenarios/level-3/lambda-at-edge.yaml +64 -0
  30. package/courses/aws-lambda-debugging/scenarios/level-3/lambda-extensions-debugging.yaml +67 -0
  31. package/courses/aws-lambda-debugging/scenarios/level-3/powertools-observability.yaml +79 -0
  32. package/courses/aws-lambda-debugging/scenarios/level-3/step-functions-debugging.yaml +80 -0
  33. package/courses/aws-lambda-debugging/scenarios/level-4/cost-optimization-strategy.yaml +67 -0
  34. package/courses/aws-lambda-debugging/scenarios/level-4/expert-debugging-shift.yaml +62 -0
  35. package/courses/aws-lambda-debugging/scenarios/level-4/incident-management-serverless.yaml +61 -0
  36. package/courses/aws-lambda-debugging/scenarios/level-4/multi-region-serverless.yaml +67 -0
  37. package/courses/aws-lambda-debugging/scenarios/level-4/observability-platform-design.yaml +71 -0
  38. package/courses/aws-lambda-debugging/scenarios/level-4/serverless-architecture-design.yaml +64 -0
  39. package/courses/aws-lambda-debugging/scenarios/level-4/serverless-data-architecture.yaml +66 -0
  40. package/courses/aws-lambda-debugging/scenarios/level-4/serverless-migration-strategy.yaml +65 -0
  41. package/courses/aws-lambda-debugging/scenarios/level-4/serverless-security-design.yaml +60 -0
  42. package/courses/aws-lambda-debugging/scenarios/level-4/serverless-testing-strategy.yaml +62 -0
  43. package/courses/aws-lambda-debugging/scenarios/level-5/board-serverless-strategy.yaml +63 -0
  44. package/courses/aws-lambda-debugging/scenarios/level-5/consulting-serverless-adoption.yaml +57 -0
  45. package/courses/aws-lambda-debugging/scenarios/level-5/industry-serverless-patterns.yaml +62 -0
  46. package/courses/aws-lambda-debugging/scenarios/level-5/ma-serverless-integration.yaml +75 -0
  47. package/courses/aws-lambda-debugging/scenarios/level-5/master-debugging-shift.yaml +61 -0
  48. package/courses/aws-lambda-debugging/scenarios/level-5/organizational-serverless-transformation.yaml +65 -0
  49. package/courses/aws-lambda-debugging/scenarios/level-5/regulatory-serverless.yaml +61 -0
  50. package/courses/aws-lambda-debugging/scenarios/level-5/serverless-economics.yaml +65 -0
  51. package/courses/aws-lambda-debugging/scenarios/level-5/serverless-future-technology.yaml +66 -0
  52. package/courses/aws-lambda-debugging/scenarios/level-5/serverless-platform-design.yaml +71 -0
  53. package/courses/docker-container-debugging/course.yaml +11 -0
  54. package/courses/docker-container-debugging/scenarios/level-1/container-exit-codes.yaml +59 -0
  55. package/courses/docker-container-debugging/scenarios/level-1/container-networking-basics.yaml +69 -0
  56. package/courses/docker-container-debugging/scenarios/level-1/docker-logs-debugging.yaml +67 -0
  57. package/courses/docker-container-debugging/scenarios/level-1/dockerfile-build-failures.yaml +71 -0
  58. package/courses/docker-container-debugging/scenarios/level-1/environment-variable-issues.yaml +74 -0
  59. package/courses/docker-container-debugging/scenarios/level-1/first-debugging-shift.yaml +70 -0
  60. package/courses/docker-container-debugging/scenarios/level-1/image-pull-failures.yaml +68 -0
  61. package/courses/docker-container-debugging/scenarios/level-1/port-mapping-issues.yaml +67 -0
  62. package/courses/docker-container-debugging/scenarios/level-1/resource-limits-oom.yaml +70 -0
  63. package/courses/docker-container-debugging/scenarios/level-1/volume-mount-problems.yaml +66 -0
  64. package/courses/docker-container-debugging/scenarios/level-2/container-health-checks.yaml +73 -0
  65. package/courses/docker-container-debugging/scenarios/level-2/docker-compose-debugging.yaml +66 -0
  66. package/courses/docker-container-debugging/scenarios/level-2/docker-exec-debugging.yaml +71 -0
  67. package/courses/docker-container-debugging/scenarios/level-2/image-layer-optimization.yaml +81 -0
  68. package/courses/docker-container-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +73 -0
  69. package/courses/docker-container-debugging/scenarios/level-2/logging-and-log-rotation.yaml +76 -0
  70. package/courses/docker-container-debugging/scenarios/level-2/multi-stage-build-debugging.yaml +76 -0
  71. package/courses/docker-container-debugging/scenarios/level-2/network-debugging-tools.yaml +67 -0
  72. package/courses/docker-container-debugging/scenarios/level-2/pid1-signal-handling.yaml +71 -0
  73. package/courses/docker-container-debugging/scenarios/level-2/security-scanning-basics.yaml +67 -0
  74. package/courses/docker-container-debugging/scenarios/level-3/advanced-debugging-shift.yaml +77 -0
  75. package/courses/docker-container-debugging/scenarios/level-3/buildkit-optimization.yaml +67 -0
  76. package/courses/docker-container-debugging/scenarios/level-3/container-filesystem-debugging.yaml +70 -0
  77. package/courses/docker-container-debugging/scenarios/level-3/container-security-hardening.yaml +74 -0
  78. package/courses/docker-container-debugging/scenarios/level-3/disk-space-management.yaml +74 -0
  79. package/courses/docker-container-debugging/scenarios/level-3/docker-api-automation.yaml +72 -0
  80. package/courses/docker-container-debugging/scenarios/level-3/docker-daemon-issues.yaml +73 -0
  81. package/courses/docker-container-debugging/scenarios/level-3/docker-in-docker-ci.yaml +69 -0
  82. package/courses/docker-container-debugging/scenarios/level-3/overlay-network-debugging.yaml +70 -0
  83. package/courses/docker-container-debugging/scenarios/level-3/production-container-ops.yaml +71 -0
  84. package/courses/docker-container-debugging/scenarios/level-4/cicd-pipeline-design.yaml +66 -0
  85. package/courses/docker-container-debugging/scenarios/level-4/container-monitoring-observability.yaml +63 -0
  86. package/courses/docker-container-debugging/scenarios/level-4/container-orchestration-strategy.yaml +62 -0
  87. package/courses/docker-container-debugging/scenarios/level-4/container-performance-engineering.yaml +64 -0
  88. package/courses/docker-container-debugging/scenarios/level-4/container-security-architecture.yaml +66 -0
  89. package/courses/docker-container-debugging/scenarios/level-4/enterprise-image-management.yaml +58 -0
  90. package/courses/docker-container-debugging/scenarios/level-4/expert-debugging-shift.yaml +63 -0
  91. package/courses/docker-container-debugging/scenarios/level-4/incident-response-containers.yaml +70 -0
  92. package/courses/docker-container-debugging/scenarios/level-4/multi-environment-management.yaml +65 -0
  93. package/courses/docker-container-debugging/scenarios/level-4/stateful-service-containers.yaml +65 -0
  94. package/courses/docker-container-debugging/scenarios/level-5/board-infrastructure-strategy.yaml +58 -0
  95. package/courses/docker-container-debugging/scenarios/level-5/consulting-container-strategy.yaml +61 -0
  96. package/courses/docker-container-debugging/scenarios/level-5/container-platform-architecture.yaml +67 -0
  97. package/courses/docker-container-debugging/scenarios/level-5/container-platform-economics.yaml +67 -0
  98. package/courses/docker-container-debugging/scenarios/level-5/container-technology-evolution.yaml +67 -0
  99. package/courses/docker-container-debugging/scenarios/level-5/disaster-recovery-containers.yaml +66 -0
  100. package/courses/docker-container-debugging/scenarios/level-5/industry-container-patterns.yaml +71 -0
  101. package/courses/docker-container-debugging/scenarios/level-5/master-debugging-shift.yaml +62 -0
  102. package/courses/docker-container-debugging/scenarios/level-5/organizational-transformation.yaml +67 -0
  103. package/courses/docker-container-debugging/scenarios/level-5/regulatory-compliance-containers.yaml +61 -0
  104. package/courses/kubernetes-deployment-troubleshooting/course.yaml +12 -0
  105. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/configmap-secret-issues.yaml +69 -0
  106. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/crashloopbackoff.yaml +68 -0
  107. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/deployment-rollout.yaml +56 -0
  108. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/first-troubleshooting-shift.yaml +65 -0
  109. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/health-probe-failures.yaml +70 -0
  110. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/imagepullbackoff.yaml +57 -0
  111. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/kubectl-debugging-basics.yaml +56 -0
  112. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/oomkilled.yaml +70 -0
  113. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/pending-pods.yaml +68 -0
  114. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/service-not-reachable.yaml +66 -0
  115. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/dns-resolution-failures.yaml +63 -0
  116. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/helm-deployment-failures.yaml +63 -0
  117. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/hpa-scaling-issues.yaml +62 -0
  118. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/ingress-routing-issues.yaml +63 -0
  119. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/init-container-failures.yaml +63 -0
  120. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/intermediate-troubleshooting-shift.yaml +66 -0
  121. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/network-policy-blocking.yaml +67 -0
  122. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/persistent-volume-issues.yaml +69 -0
  123. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/rbac-permission-denied.yaml +57 -0
  124. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/resource-quota-limits.yaml +64 -0
  125. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/advanced-troubleshooting-shift.yaml +69 -0
  126. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/cluster-upgrade-failures.yaml +71 -0
  127. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/gitops-drift-detection.yaml +62 -0
  128. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/job-cronjob-failures.yaml +67 -0
  129. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/monitoring-alerting-gaps.yaml +64 -0
  130. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/multi-container-debugging.yaml +68 -0
  131. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/node-pressure-evictions.yaml +70 -0
  132. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/pod-disruption-budgets.yaml +59 -0
  133. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/service-mesh-debugging.yaml +64 -0
  134. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/statefulset-troubleshooting.yaml +69 -0
  135. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/capacity-planning.yaml +65 -0
  136. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/cost-optimization.yaml +57 -0
  137. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/disaster-recovery-design.yaml +56 -0
  138. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/executive-communication.yaml +62 -0
  139. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/expert-troubleshooting-shift.yaml +65 -0
  140. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/incident-management-process.yaml +59 -0
  141. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-cluster-operations.yaml +62 -0
  142. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-tenancy-design.yaml +55 -0
  143. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/platform-engineering.yaml +59 -0
  144. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/security-hardening.yaml +58 -0
  145. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/behavioral-science.yaml +62 -0
  146. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/board-strategy.yaml +61 -0
  147. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/cloud-native-future.yaml +65 -0
  148. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/comprehensive-platform.yaml +57 -0
  149. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/consulting-engagement.yaml +62 -0
  150. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/industry-benchmarks.yaml +58 -0
  151. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/ma-integration.yaml +62 -0
  152. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/master-troubleshooting-shift.yaml +73 -0
  153. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/product-development.yaml +65 -0
  154. package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/regulatory-compliance.yaml +76 -0
  155. package/courses/mysql-query-optimization/course.yaml +11 -0
  156. package/courses/mysql-query-optimization/scenarios/level-1/buffer-pool-basics.yaml +65 -0
  157. package/courses/mysql-query-optimization/scenarios/level-1/explain-basics.yaml +66 -0
  158. package/courses/mysql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +78 -0
  159. package/courses/mysql-query-optimization/scenarios/level-1/innodb-index-fundamentals.yaml +68 -0
  160. package/courses/mysql-query-optimization/scenarios/level-1/join-basics.yaml +66 -0
  161. package/courses/mysql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +67 -0
  162. package/courses/mysql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +66 -0
  163. package/courses/mysql-query-optimization/scenarios/level-1/select-star-problems.yaml +68 -0
  164. package/courses/mysql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +65 -0
  165. package/courses/mysql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +65 -0
  166. package/courses/mysql-query-optimization/scenarios/level-2/buffer-pool-tuning.yaml +64 -0
  167. package/courses/mysql-query-optimization/scenarios/level-2/composite-index-design.yaml +71 -0
  168. package/courses/mysql-query-optimization/scenarios/level-2/covering-and-invisible-indexes.yaml +69 -0
  169. package/courses/mysql-query-optimization/scenarios/level-2/cte-and-window-functions.yaml +78 -0
  170. package/courses/mysql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +68 -0
  171. package/courses/mysql-query-optimization/scenarios/level-2/join-optimization.yaml +67 -0
  172. package/courses/mysql-query-optimization/scenarios/level-2/performance-schema-analysis.yaml +69 -0
  173. package/courses/mysql-query-optimization/scenarios/level-2/query-optimizer-hints.yaml +74 -0
  174. package/courses/mysql-query-optimization/scenarios/level-2/subquery-optimization.yaml +70 -0
  175. package/courses/mysql-query-optimization/scenarios/level-2/write-optimization.yaml +63 -0
  176. package/courses/mysql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
  177. package/courses/mysql-query-optimization/scenarios/level-3/connection-management.yaml +67 -0
  178. package/courses/mysql-query-optimization/scenarios/level-3/full-text-search.yaml +77 -0
  179. package/courses/mysql-query-optimization/scenarios/level-3/json-optimization.yaml +87 -0
  180. package/courses/mysql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +68 -0
  181. package/courses/mysql-query-optimization/scenarios/level-3/monitoring-alerting.yaml +63 -0
  182. package/courses/mysql-query-optimization/scenarios/level-3/online-schema-changes.yaml +79 -0
  183. package/courses/mysql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +83 -0
  184. package/courses/mysql-query-optimization/scenarios/level-3/query-profiling-deep-dive.yaml +84 -0
  185. package/courses/mysql-query-optimization/scenarios/level-3/replication-optimization.yaml +66 -0
  186. package/courses/mysql-query-optimization/scenarios/level-4/aurora-vs-rds-evaluation.yaml +61 -0
  187. package/courses/mysql-query-optimization/scenarios/level-4/data-architecture.yaml +62 -0
  188. package/courses/mysql-query-optimization/scenarios/level-4/database-migration-planning.yaml +59 -0
  189. package/courses/mysql-query-optimization/scenarios/level-4/enterprise-governance.yaml +50 -0
  190. package/courses/mysql-query-optimization/scenarios/level-4/executive-communication.yaml +54 -0
  191. package/courses/mysql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +67 -0
  192. package/courses/mysql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +60 -0
  193. package/courses/mysql-query-optimization/scenarios/level-4/optimizer-internals.yaml +62 -0
  194. package/courses/mysql-query-optimization/scenarios/level-4/performance-sla-design.yaml +52 -0
  195. package/courses/mysql-query-optimization/scenarios/level-4/read-replica-scaling.yaml +51 -0
  196. package/courses/mysql-query-optimization/scenarios/level-5/ai-database-future.yaml +45 -0
  197. package/courses/mysql-query-optimization/scenarios/level-5/behavioral-science.yaml +44 -0
  198. package/courses/mysql-query-optimization/scenarios/level-5/benchmark-design.yaml +47 -0
  199. package/courses/mysql-query-optimization/scenarios/level-5/board-strategy.yaml +48 -0
  200. package/courses/mysql-query-optimization/scenarios/level-5/comprehensive-platform.yaml +49 -0
  201. package/courses/mysql-query-optimization/scenarios/level-5/consulting-engagement.yaml +52 -0
  202. package/courses/mysql-query-optimization/scenarios/level-5/ma-database-integration.yaml +47 -0
  203. package/courses/mysql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +56 -0
  204. package/courses/mysql-query-optimization/scenarios/level-5/product-development.yaml +48 -0
  205. package/courses/mysql-query-optimization/scenarios/level-5/regulatory-compliance.yaml +48 -0
  206. package/courses/postgresql-query-optimization/scenarios/level-5/comprehensive-database-system.yaml +70 -0
  207. package/courses/postgresql-query-optimization/scenarios/level-5/database-ai-future.yaml +81 -0
  208. package/courses/postgresql-query-optimization/scenarios/level-5/database-behavioral-science.yaml +63 -0
  209. package/courses/postgresql-query-optimization/scenarios/level-5/database-board-strategy.yaml +77 -0
  210. package/courses/postgresql-query-optimization/scenarios/level-5/database-consulting-engagement.yaml +61 -0
  211. package/courses/postgresql-query-optimization/scenarios/level-5/database-industry-benchmarks.yaml +64 -0
  212. package/courses/postgresql-query-optimization/scenarios/level-5/database-ma-integration.yaml +71 -0
  213. package/courses/postgresql-query-optimization/scenarios/level-5/database-product-development.yaml +72 -0
  214. package/courses/postgresql-query-optimization/scenarios/level-5/database-regulatory-landscape.yaml +76 -0
  215. package/courses/postgresql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +66 -0
  216. package/courses/terraform-infrastructure-setup/course.yaml +11 -0
  217. package/courses/terraform-infrastructure-setup/scenarios/level-1/terraform-init-errors.yaml +72 -0
  218. package/dist/mcp/session-manager.d.ts +7 -4
  219. package/dist/mcp/session-manager.d.ts.map +1 -1
  220. package/dist/mcp/session-manager.js +23 -8
  221. package/dist/mcp/session-manager.js.map +1 -1
  222. package/package.json +1 -1
@@ -0,0 +1,67 @@
1
+ meta:
2
+ id: docker-logs-debugging
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug with Docker logs — learn to use docker logs, docker inspect, and docker exec for systematic container troubleshooting"
7
+ tags: [Docker, logs, inspect, exec, debugging-commands, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your containerized web application is running but returning 500
13
+ errors. You need to figure out what's wrong.
14
+
15
+ $ docker ps
16
+ CONTAINER ID IMAGE STATUS PORTS NAMES
17
+ a1b2c3d4e5f6 webapp:v2.1 Up 3 minutes 0.0.0.0:8080->3000/tcp api
18
+
19
+ $ curl http://localhost:8080/health
20
+ {"status":"error","message":"database connection failed"}
21
+
22
+ Step 1 — Check logs:
23
+ $ docker logs api
24
+ [2025-12-01T10:00:00] Starting server on port 3000
25
+ [2025-12-01T10:00:01] Error: connect ECONNREFUSED 172.17.0.5:5432
26
+ [2025-12-01T10:00:02] Retrying database connection (1/5)...
27
+ [2025-12-01T10:00:03] Error: connect ECONNREFUSED 172.17.0.5:5432
28
+ [2025-12-01T10:00:08] All retry attempts failed. Running in degraded mode.
29
+
30
+ Step 2 — Inspect the container:
31
+ $ docker inspect api --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
32
+ 172.17.0.3
33
+
34
+ $ docker inspect api --format='{{json .Config.Env}}' | jq
35
+ ["DATABASE_URL=postgres://user:pass@172.17.0.5:5432/mydb", "NODE_ENV=production"]
36
+
37
+ The DATABASE_URL points to 172.17.0.5 but is that IP still valid?
38
+
39
+ Step 3 — Exec into the container:
40
+ $ docker exec -it api sh
41
+ /app $ ping 172.17.0.5
42
+ PING 172.17.0.5: 56 data bytes
43
+ --- 172.17.0.5 ping statistics ---
44
+ 3 packets transmitted, 0 received, 100% packet loss
45
+
46
+ The database container IP changed (it was restarted and got a new IP).
47
+ The hardcoded IP in DATABASE_URL is stale.
48
+
49
+ Task: Explain the Docker debugging toolkit. Write: how to use docker
50
+ logs (with --follow, --since, --tail), docker inspect for container
51
+ metadata, docker exec for interactive debugging, docker stats for
52
+ resource monitoring, docker events for real-time lifecycle events,
53
+ and the systematic approach to diagnosing container issues.
54
+
55
+ assertions:
56
+ - type: llm_judge
57
+ criteria: "Docker logs usage is comprehensive — docker logs <container> shows stdout/stderr, --follow (-f) streams in real-time, --since '10m' shows last 10 minutes, --tail 100 shows last 100 lines, --timestamps adds timestamps. For containers that write logs to files instead of stdout, logs command shows nothing — must exec into container or mount log volume"
58
+ weight: 0.35
59
+ description: "Docker logs"
60
+ - type: llm_judge
61
+ criteria: "Docker inspect and exec are explained — docker inspect returns full JSON metadata (network settings, env vars, mounts, state, config). Use --format with Go templates to extract specific fields. docker exec -it <container> sh opens interactive shell for debugging (check files, environment, network). docker exec can also run one-off commands: docker exec api env, docker exec api cat /etc/hosts"
62
+ weight: 0.35
63
+ description: "Inspect and exec"
64
+ - type: llm_judge
65
+ criteria: "Systematic debugging approach is shown — (1) docker ps to check container status, (2) docker logs for application errors, (3) docker inspect for configuration and network info, (4) docker exec to investigate inside the container, (5) docker stats for resource usage. The IP issue demonstrates why you should use container names or Docker DNS instead of hardcoded IPs. Use Docker networks for reliable service discovery"
66
+ weight: 0.30
67
+ description: "Systematic approach"
@@ -0,0 +1,71 @@
1
+ meta:
2
+ id: dockerfile-build-failures
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug Dockerfile build failures — diagnose COPY errors, missing dependencies, and common Dockerfile mistakes"
7
+ tags: [Docker, Dockerfile, build, COPY, dependencies, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your Docker build keeps failing with different errors:
13
+
14
+ $ docker build -t myapp .
15
+
16
+ Attempt 1:
17
+ Step 5/10: COPY package.json ./
18
+ COPY failed: file not found in build context or excluded by .dockerignore
19
+
20
+ The file exists in the project but the build context is wrong. You're
21
+ running docker build from the wrong directory, or .dockerignore is
22
+ excluding package.json.
23
+
24
+ After fixing the context:
25
+
26
+ Attempt 2:
27
+ Step 7/10: RUN npm install
28
+ npm ERR! code ENOENT
29
+ npm ERR! syscall open
30
+ npm ERR! path /app/package.json
31
+ npm ERR! No such file or directory
32
+
33
+ COPY succeeded but the WORKDIR wasn't set — files were copied to /
34
+ but npm install runs in /app.
35
+
36
+ After adding WORKDIR /app:
37
+
38
+ Attempt 3:
39
+ Step 8/10: RUN npm run build
40
+ sh: 1: node: not found
41
+
42
+ The base image doesn't have Node.js. The Dockerfile uses FROM ubuntu
43
+ instead of FROM node:20.
44
+
45
+ The problematic Dockerfile:
46
+ FROM ubuntu:22.04
47
+ RUN apt-get update
48
+ COPY . .
49
+ RUN npm install
50
+ RUN npm run build
51
+ CMD ["node", "dist/server.js"]
52
+
53
+ Task: Explain common Dockerfile build failures. Write: how the build
54
+ context works (what files are available during build), the role of
55
+ .dockerignore, common COPY/ADD errors, the importance of WORKDIR,
56
+ choosing the right base image, the order of Dockerfile instructions
57
+ for layer caching, and how to debug build failures step by step.
58
+
59
+ assertions:
60
+ - type: llm_judge
61
+ criteria: "Build context is explained — the build context is the directory sent to the Docker daemon (specified in docker build <path>). COPY and ADD can only access files in the build context. .dockerignore excludes files from the context (like .gitignore). Common mistakes: running docker build from wrong directory, .dockerignore excluding needed files, trying to COPY files outside the build context (../file is not allowed)"
62
+ weight: 0.35
63
+ description: "Build context explained"
64
+ - type: llm_judge
65
+ criteria: "Common Dockerfile mistakes are covered — missing WORKDIR (files end up in /), wrong base image (missing runtime), COPY before dependency install (breaks layer caching — COPY package.json first, then npm install, then COPY . .), missing RUN apt-get install for dependencies, using ADD when COPY suffices (ADD does tar extraction and URL fetching), not cleaning up apt cache (bloats image)"
66
+ weight: 0.35
67
+ description: "Common mistakes"
68
+ - type: llm_judge
69
+ criteria: "Debugging approach is practical — read error messages carefully (they indicate the step that failed), use docker build --progress=plain for detailed output, inspect intermediate layers (build with --target or use BuildKit debug), check .dockerignore contents, verify build context with docker build --file and --context flags, use RUN ls to verify file locations during debugging"
70
+ weight: 0.30
71
+ description: "Debugging approach"
@@ -0,0 +1,74 @@
1
+ meta:
2
+ id: environment-variable-issues
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug Docker environment variable issues — diagnose missing, overridden, or incorrectly passed env vars in containers"
7
+ tags: [Docker, environment-variables, ENV, env-file, configuration, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your containerized app is failing because of environment variable
13
+ issues:
14
+
15
+ $ docker run -d --name api \
16
+ -e DATABASE_URL=postgres://user:pass@db:5432/mydb \
17
+ -e API_KEY=sk-abc123 \
18
+ myapp:v1.0
19
+
20
+ $ docker logs api
21
+ Error: Missing required environment variable: API_SECRET
22
+ Error: DATABASE_URL has invalid format
23
+
24
+ Two issues:
25
+ 1. API_SECRET isn't set — only API_KEY was provided, but the app
26
+ expects API_SECRET
27
+ 2. DATABASE_URL value contains special characters in the password
28
+ that weren't properly quoted
29
+
30
+ $ docker exec api env | sort
31
+ API_KEY=sk-abc123
32
+ DATABASE_URL=postgres://user:pass@db:5432/mydb
33
+ HOME=/root
34
+ NODE_ENV=production
35
+ PATH=/usr/local/bin:/usr/bin:/bin
36
+
37
+ Wait — NODE_ENV=production is set even though you didn't specify it.
38
+ It must be set in the Dockerfile with ENV:
39
+
40
+ Dockerfile:
41
+ FROM node:20
42
+ ENV NODE_ENV=production
43
+ WORKDIR /app
44
+ COPY . .
45
+ RUN npm install --production
46
+ CMD ["node", "server.js"]
47
+
48
+ Ways to pass environment variables:
49
+ 1. -e KEY=VALUE (single variable)
50
+ 2. --env-file .env (file with KEY=VALUE lines)
51
+ 3. ENV in Dockerfile (baked into image)
52
+ 4. Docker Compose environment: section
53
+
54
+ Priority: runtime (-e) overrides Dockerfile (ENV).
55
+
56
+ Task: Explain Docker environment variables. Write: the different ways
57
+ to pass env vars (-e, --env-file, ENV, Compose), precedence rules,
58
+ how to inspect env vars in running containers, common mistakes (special
59
+ characters, missing quotes, wrong variable names), security concerns
60
+ (env vars visible in docker inspect), and best practices.
61
+
62
+ assertions:
63
+ - type: llm_judge
64
+ criteria: "Env var methods are explained — -e KEY=VALUE at runtime, --env-file reads from file (one KEY=VALUE per line, no quotes needed), ENV in Dockerfile (baked into image, visible in all containers), Docker Compose environment section. Runtime values override Dockerfile ENV. ARG is build-time only and NOT available at runtime (common confusion)"
65
+ weight: 0.35
66
+ description: "Env var methods"
67
+ - type: llm_judge
68
+ criteria: "Common mistakes are covered — special characters in values need proper quoting (-e 'DB_URL=postgres://user:p@ss@db:5432/db'), missing variables (app expects different name), env var not available at runtime (used ARG instead of ENV), --env-file doesn't support comments inline with values in some versions, .env file not found (wrong path). Debugging: docker exec <container> env to see actual variables"
69
+ weight: 0.35
70
+ description: "Common mistakes"
71
+ - type: llm_judge
72
+ criteria: "Security concerns are addressed — env vars are visible in docker inspect output (anyone with Docker access can see them), they appear in /proc/<pid>/environ inside the container, they may be logged accidentally. Better alternatives for secrets: Docker secrets (Swarm), mount secret files as volumes, use secret management tools (Vault, AWS Secrets Manager). Never put secrets in Dockerfiles (they're baked into image layers)"
73
+ weight: 0.30
74
+ description: "Security concerns"
@@ -0,0 +1,70 @@
1
+ meta:
2
+ id: first-debugging-shift
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Combined debugging shift — diagnose multiple Docker container failures using the full beginner debugging toolkit"
7
+ tags: [Docker, troubleshooting, combined, shift-simulation, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're helping a teammate deploy a 3-container application stack for
13
+ the first time. Nothing is working:
14
+
15
+ $ docker ps -a
16
+ CONTAINER ID IMAGE STATUS PORTS NAMES
17
+ a1b2c3d4e5f6 myapp:v1 Exited (127) 2 min ago api
18
+ b2c3d4e5f6g7 postgres:16 Up 5 minutes db
19
+ c3d4e5f6g7h8 redis:7 Exited (1) 3 min ago cache
20
+
21
+ Three containers, two are stopped, one is running but inaccessible.
22
+
23
+ Issue 1 — api container (exit code 127):
24
+ $ docker logs api
25
+ /bin/sh: 1: node: not found
26
+ The Dockerfile uses FROM python:3.12 but CMD ["node", "server.js"].
27
+ Wrong base image!
28
+
29
+ Issue 2 — cache container (exit code 1):
30
+ $ docker logs cache
31
+ Fatal error: Can't open config file /etc/redis/redis.conf
32
+ A bind mount -v ./redis.conf:/etc/redis/redis.conf was specified
33
+ but ./redis.conf doesn't exist on the host. Docker created an empty
34
+ directory in its place.
35
+
36
+ Issue 3 — db container (running but inaccessible):
37
+ $ docker exec api ping db
38
+ (api is stopped, can't exec into it)
39
+
40
+ $ docker run --rm postgres:16 pg_isready -h db
41
+ db:5432 - no response
42
+
43
+ The database is running but on the default bridge network. The
44
+ hostname "db" doesn't resolve because default bridge doesn't
45
+ support DNS.
46
+
47
+ Additional issue found:
48
+ $ curl http://localhost:3000
49
+ Connection refused
50
+ No -p flag was used for the api container — no port published.
51
+
52
+ Task: Walk through debugging all three issues. Write: the triage
53
+ approach (check status, check logs, check configuration), the fix
54
+ for each issue, why exit code 127 means command not found, why Docker
55
+ creates directories for missing bind mount files, and the checklist
56
+ for running multi-container applications.
57
+
58
+ assertions:
59
+ - type: llm_judge
60
+ criteria: "All three issues are correctly diagnosed — (1) exit code 127 = command not found, wrong base image (python instead of node), (2) bind mount of non-existent file creates empty directory (Docker's default behavior), redis can't read a directory as config file, (3) default bridge network doesn't support DNS resolution, containers can't find each other by name, also no port published for external access"
61
+ weight: 0.35
62
+ description: "All issues diagnosed"
63
+ - type: llm_judge
64
+ criteria: "Fixes are practical — (1) change Dockerfile base image to node:20 or fix CMD to use python, (2) ensure redis.conf exists before starting container, or use default redis config without the mount, (3) create custom network and put all containers on it, add -p flag for external access. Show the corrected docker run commands for each container"
65
+ weight: 0.35
66
+ description: "Practical fixes"
67
+ - type: llm_judge
68
+ criteria: "Multi-container checklist is provided — before starting: verify all images are correct and available, check all mount source paths exist, create a custom network, plan port mappings. Use Docker Compose for multi-container apps (avoids manual docker run flags). Debugging order: check status → check logs → check inspect → check network → fix and retry"
69
+ weight: 0.30
70
+ description: "Multi-container checklist"
@@ -0,0 +1,68 @@
1
+ meta:
2
+ id: image-pull-failures
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug Docker image pull failures — diagnose authentication errors, rate limits, and wrong image references"
7
+ tags: [Docker, image-pull, registry, authentication, Docker-Hub, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You can't pull or run Docker images and see different error messages:
13
+
14
+ Scenario 1 — Image not found:
15
+ $ docker pull mycompany/backend:v2.1.0
16
+ Error response from daemon: pull access denied for mycompany/backend,
17
+ repository does not exist or may require 'docker login'
18
+
19
+ Is the image name wrong? Is it a private repository?
20
+ The image is on a private registry (ghcr.io), not Docker Hub:
21
+ $ docker pull ghcr.io/mycompany/backend:v2.1.0
22
+
23
+ Scenario 2 — Authentication required:
24
+ $ docker pull ghcr.io/mycompany/backend:v2.1.0
25
+ Error response from daemon: Head "https://ghcr.io/v2/mycompany/backend/
26
+ manifests/v2.1.0": unauthorized: authentication required
27
+
28
+ $ docker login ghcr.io -u myuser
29
+ Login Succeeded
30
+
31
+ $ docker pull ghcr.io/mycompany/backend:v2.1.0
32
+ v2.1.0: Pulling from mycompany/backend
33
+
34
+ Scenario 3 — Docker Hub rate limit:
35
+ $ docker pull nginx:latest
36
+ Error response from daemon: toomanyrequests: You have reached your
37
+ pull rate limit. You may increase the limit by authenticating.
38
+
39
+ Docker Hub limits anonymous pulls to 100/6h and authenticated to
40
+ 200/6h. In CI/CD, this gets exhausted fast.
41
+
42
+ Scenario 4 — Platform mismatch:
43
+ $ docker pull myimage:latest
44
+ WARNING: image with reference myimage:latest was found but does not
45
+ match the specified platform (linux/arm64)
46
+
47
+ You're on an Apple Silicon Mac (ARM) but the image is only built
48
+ for linux/amd64. The container will run via emulation (slow) or fail.
49
+
50
+ Task: Explain Docker image pull issues. Write: how Docker resolves
51
+ image references (registry/repository:tag), authentication (docker
52
+ login, credential stores), Docker Hub rate limits and workarounds,
53
+ image tags vs digests, multi-platform images, and how to verify an
54
+ image exists before pulling.
55
+
56
+ assertions:
57
+ - type: llm_judge
58
+ criteria: "Image reference format is explained — full format: registry/repository:tag. If no registry specified, Docker Hub is assumed. If no tag, :latest is assumed. Private registries require full URL (ghcr.io/org/image:tag, registry.company.com/image:tag). Common mistake: forgetting the registry prefix for non-Docker Hub images"
59
+ weight: 0.35
60
+ description: "Image references"
61
+ - type: llm_judge
62
+ criteria: "Authentication and rate limits are covered — docker login stores credentials in ~/.docker/config.json (can use credential helpers for security). Docker Hub rate limits: 100 pulls/6h anonymous, 200/6h authenticated. Workarounds: authenticate in CI/CD, use a pull-through cache or mirror, use private registry. For GHCR/ECR/GCR, use specific login commands or credential helpers"
63
+ weight: 0.35
64
+ description: "Auth and rate limits"
65
+ - type: llm_judge
66
+ criteria: "Tags, digests, and platforms are explained — tags are mutable (latest can change), digests are immutable (sha256:abc...). Use digests for reproducible builds. Multi-platform images: docker manifest inspect shows supported platforms. --platform flag to pull specific architecture. Apple Silicon users: some images aren't built for arm64, causing emulation overhead or failures"
67
+ weight: 0.30
68
+ description: "Tags and platforms"
@@ -0,0 +1,67 @@
1
+ meta:
2
+ id: port-mapping-issues
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug Docker port mapping issues — diagnose why you can't connect to a containerized service"
7
+ tags: [Docker, port-mapping, networking, EXPOSE, publish, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You started your web application container but can't reach it:
13
+
14
+ $ docker run -d --name webapp myapp:latest
15
+ $ curl http://localhost:3000
16
+ curl: (7) Failed to connect to localhost port 3000: Connection refused
17
+
18
+ The Dockerfile has EXPOSE 3000, so why isn't it accessible?
19
+
20
+ $ docker ps
21
+ CONTAINER ID IMAGE STATUS PORTS NAMES
22
+ a1b2c3d4e5f6 myapp:latest Up 1 min webapp
23
+
24
+ The PORTS column is empty! EXPOSE in the Dockerfile is just
25
+ documentation — it doesn't actually publish the port. You need -p:
26
+
27
+ $ docker run -d --name webapp -p 3000:3000 myapp:latest
28
+
29
+ Now another issue:
30
+ $ curl http://localhost:3000
31
+ curl: (7) Failed to connect to localhost port 3000: Connection refused
32
+
33
+ $ docker logs webapp
34
+ Server listening on 127.0.0.1:3000
35
+
36
+ The app is listening on 127.0.0.1 (localhost inside the container),
37
+ not 0.0.0.0. Inside the container, 127.0.0.1 means the container's
38
+ own loopback — it's not accessible from outside the container.
39
+
40
+ Fix: configure the app to listen on 0.0.0.0:3000.
41
+
42
+ After fixing:
43
+ $ docker run -d --name webapp -p 8080:3000 myapp:latest
44
+ $ curl http://localhost:8080
45
+ {"status": "ok"}
46
+
47
+ Port mapping: host port 8080 → container port 3000.
48
+
49
+ Task: Explain Docker port mapping. Write: the difference between
50
+ EXPOSE and -p/--publish, how port mapping works (host:container),
51
+ why apps must listen on 0.0.0.0 not 127.0.0.1, the -P flag for
52
+ random ports, binding to specific interfaces (-p 127.0.0.1:8080:3000),
53
+ and common port mapping mistakes.
54
+
55
+ assertions:
56
+ - type: llm_judge
57
+ criteria: "EXPOSE vs -p is clearly explained — EXPOSE is metadata/documentation in the Dockerfile, it does NOT actually publish the port. -p (--publish) creates the actual port mapping at runtime. Format: -p <host-port>:<container-port>. -P (capital P) publishes all EXPOSE'd ports to random host ports. You can run containers without EXPOSE and still use -p"
58
+ weight: 0.35
59
+ description: "EXPOSE vs publish"
60
+ - type: llm_judge
61
+ criteria: "The 0.0.0.0 vs 127.0.0.1 issue is explained — containers have their own network namespace. 127.0.0.1 inside a container is the container's loopback, not the host's. Apps must bind to 0.0.0.0 (all interfaces) to be accessible from outside the container. This is the most common port mapping debugging issue. Some frameworks default to 127.0.0.1 (Rails, Flask) and need explicit configuration"
62
+ weight: 0.35
63
+ description: "Bind address explained"
64
+ - type: llm_judge
65
+ criteria: "Port mapping variations and mistakes are covered — -p 8080:3000 (host 8080 → container 3000), -p 127.0.0.1:8080:3000 (only accessible from host localhost), -p 3000 (random host port → container 3000). Common mistakes: forgetting -p entirely, app binding to wrong address, port already in use on host (docker: bind: address already in use), confusing host and container ports"
66
+ weight: 0.30
67
+ description: "Variations and mistakes"
@@ -0,0 +1,70 @@
1
+ meta:
2
+ id: resource-limits-oom
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug Docker resource limits and OOM kills — understand memory limits, CPU constraints, and why containers get killed"
7
+ tags: [Docker, resource-limits, OOM, memory, CPU, cgroups, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your container keeps getting killed mysteriously:
13
+
14
+ $ docker run -d --name worker --memory=256m worker-app:v1.0
15
+ $ docker ps
16
+ CONTAINER ID IMAGE STATUS NAMES
17
+ a1b2c3d4e5f6 worker-app:v1.0 Exited (137) 2 mins ago worker
18
+
19
+ Exit code 137 again — was it OOM killed?
20
+
21
+ $ docker inspect worker --format='{{.State.OOMKilled}}'
22
+ true
23
+
24
+ $ docker stats --no-stream worker
25
+ (container is stopped, can't get stats)
26
+
27
+ Before the kill, memory usage was climbing:
28
+ $ docker run -d --name worker --memory=256m worker-app:v1.0
29
+ $ docker stats worker --no-stream
30
+ CONTAINER CPU % MEM USAGE / LIMIT MEM %
31
+ worker 45% 248MiB / 256MiB 96.88%
32
+
33
+ The container is using 248MiB of its 256MiB limit — about to be killed.
34
+
35
+ Understanding the limits:
36
+ --memory=256m sets a hard limit (cgroup). If the process tries to
37
+ allocate more, the kernel's OOM killer terminates it (SIGKILL = 137).
38
+
39
+ --memory-reservation=128m sets a soft limit (scheduling hint, not
40
+ enforced). --memory-swap=512m sets swap limit (defaults to 2x memory).
41
+
42
+ For CPU:
43
+ --cpus=0.5 limits to 50% of one CPU core
44
+ --cpu-shares=512 sets relative weight (default 1024)
45
+
46
+ $ docker run -d --name worker \
47
+ --memory=512m \
48
+ --memory-reservation=256m \
49
+ --cpus=1.0 \
50
+ worker-app:v1.0
51
+
52
+ Task: Explain Docker resource limits. Write: how memory limits work
53
+ (cgroups hard limit, OOM kill behavior), how CPU limits work (cpus
54
+ vs cpu-shares), the difference between --memory and --memory-reservation,
55
+ how to monitor resource usage (docker stats), how to right-size
56
+ container limits, and what happens when limits are too low or not set.
57
+
58
+ assertions:
59
+ - type: llm_judge
60
+ criteria: "Memory limits are explained — --memory sets hard cgroup limit, kernel OOM killer sends SIGKILL (exit code 137) when exceeded. --memory-reservation is a soft limit (best effort, not enforced). --memory-swap controls total memory + swap (default 2x memory, set to -1 for unlimited swap, set equal to --memory to disable swap). OOMKilled flag in docker inspect confirms OOM"
61
+ weight: 0.35
62
+ description: "Memory limits"
63
+ - type: llm_judge
64
+ criteria: "CPU limits are explained — --cpus=N limits to N CPU cores (fractional allowed, e.g., 0.5), --cpu-shares sets relative weight in contention (default 1024, only matters when CPU is contested), --cpuset-cpus pins to specific cores. Without limits, containers compete for all host resources — one container can starve others"
65
+ weight: 0.35
66
+ description: "CPU limits"
67
+ - type: llm_judge
68
+ criteria: "Monitoring and right-sizing are practical — docker stats shows real-time CPU, memory, network, disk I/O per container. docker stats --no-stream for one-time snapshot. Right-sizing: run without limits, observe actual usage over time, set memory limit to peak usage + 25% buffer, set CPU based on typical load. Without limits: containers can use all host memory/CPU, causing host instability"
69
+ weight: 0.30
70
+ description: "Monitoring and sizing"
@@ -0,0 +1,66 @@
1
+ meta:
2
+ id: volume-mount-problems
3
+ level: 1
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug Docker volume mount problems — diagnose permission errors, empty directories, and data persistence issues"
7
+ tags: [Docker, volumes, bind-mounts, permissions, storage, beginner]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're trying to persist data from your container but running into
13
+ mount issues:
14
+
15
+ Scenario 1 — Empty directory after mount:
16
+ $ docker run -d -v /data/db:/var/lib/postgresql/data postgres:16
17
+ $ docker exec -it <container> ls /var/lib/postgresql/data
18
+ (empty!)
19
+
20
+ The host directory /data/db didn't exist before the mount. Docker
21
+ created it (as root) but it's empty. PostgreSQL expected to find
22
+ its data files there or initialize in a writable directory.
23
+
24
+ Scenario 2 — Permission denied:
25
+ $ docker run -d -v $(pwd)/app:/app --user 1000:1000 node:20
26
+ $ docker logs <container>
27
+ Error: EACCES: permission denied, mkdir '/app/node_modules'
28
+
29
+ The container runs as user 1000 but the mounted directory is owned
30
+ by root. The user can't write to the mount.
31
+
32
+ Scenario 3 — Data disappears:
33
+ $ docker run --name mydb postgres:16
34
+ # Insert some data...
35
+ $ docker rm mydb
36
+ $ docker run --name mydb postgres:16
37
+ # Data is gone!
38
+
39
+ No volume was specified — data was stored in the container's writable
40
+ layer, which is deleted when the container is removed.
41
+
42
+ Types of Docker storage:
43
+ 1. Bind mount: -v /host/path:/container/path (maps host directory)
44
+ 2. Named volume: -v myvolume:/container/path (Docker-managed)
45
+ 3. tmpfs: --tmpfs /container/path (in-memory, not persisted)
46
+ 4. Container layer: default writable layer (deleted with container)
47
+
48
+ Task: Explain Docker storage and how to debug volume issues. Write:
49
+ the difference between bind mounts, named volumes, and tmpfs, common
50
+ permission problems and how to fix them, why data disappears without
51
+ volumes, how to inspect volumes (docker volume inspect), and best
52
+ practices for data persistence.
53
+
54
+ assertions:
55
+ - type: llm_judge
56
+ criteria: "Storage types are explained — bind mounts map host directory to container (host path must exist, performance depends on host OS), named volumes are Docker-managed (stored in /var/lib/docker/volumes, portable, Docker manages permissions), tmpfs is in-memory (fast, not persisted, good for secrets). Container writable layer is the default (copy-on-write, deleted when container is removed)"
57
+ weight: 0.35
58
+ description: "Storage types"
59
+ - type: llm_judge
60
+ criteria: "Permission issues are addressed — bind mounts: host directory UID/GID must match container user, use --user to match, or chown in Dockerfile. Named volumes: Docker creates with correct permissions for the container. Common fix: run as root temporarily to fix permissions, or use init scripts. On macOS/Windows with Docker Desktop, bind mount performance is slower due to file system translation"
61
+ weight: 0.35
62
+ description: "Permission issues"
63
+ - type: llm_judge
64
+ criteria: "Debugging and best practices are practical — docker volume ls to list volumes, docker volume inspect to see mount point, docker inspect <container> to see mount configuration. Use docker volume prune to clean unused volumes (careful!). Best practices: use named volumes for databases (not bind mounts), use bind mounts for development (live code reload), never store important data in the container layer, backup volumes regularly"
65
+ weight: 0.30
66
+ description: "Debugging and practices"
@@ -0,0 +1,73 @@
1
+ meta:
2
+ id: container-health-checks
3
+ level: 2
4
+ course: docker-container-debugging
5
+ type: output
6
+ description: "Debug Docker health check issues — diagnose failing health checks, configure timing parameters, and design effective health endpoints"
7
+ tags: [Docker, health-checks, HEALTHCHECK, monitoring, reliability, intermediate]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your container keeps showing as "unhealthy" even though the
13
+ application works fine:
14
+
15
+ $ docker ps
16
+ CONTAINER ID IMAGE STATUS PORTS
17
+ a1b2c3d4e5f6 myapp Up 5m (unhealthy) 8080/tcp
18
+
19
+ $ docker inspect myapp --format='{{json .State.Health}}' | jq
20
+ {
21
+ "Status": "unhealthy",
22
+ "FailingStreak": 5,
23
+ "Log": [
24
+ {
25
+ "Start": "2025-12-01T10:05:00Z",
26
+ "End": "2025-12-01T10:05:10Z",
27
+ "ExitCode": 1,
28
+ "Output": " % Total % Received\n OCI runtime exec failed: exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH"
29
+ }
30
+ ]
31
+ }
32
+
33
+ The health check uses curl but the image doesn't have curl installed!
34
+
35
+ Dockerfile:
36
+ FROM node:20-alpine
37
+ HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
38
+ CMD curl -f http://localhost:3000/health || exit 1
39
+ ...
40
+
41
+ Alpine doesn't include curl. Options:
42
+ 1. Install curl: RUN apk add --no-cache curl
43
+ 2. Use wget (included in alpine): CMD wget -q -O- http://localhost:3000/health
44
+ 3. Use Node.js: CMD node -e "require('http').get('http://localhost:3000/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"
45
+
46
+ After fixing, a second issue: the app takes 45 seconds to start but
47
+ the health check starts immediately with retries=3 and interval=30s.
48
+ After 90s (3 × 30s), it's marked unhealthy during startup.
49
+
50
+ Fix: Add start_period:
51
+ HEALTHCHECK --interval=10s --timeout=5s --start-period=60s --retries=3 \
52
+ CMD wget -q -O- http://localhost:3000/health || exit 1
53
+
54
+ Task: Explain Docker health checks in depth. Write: the HEALTHCHECK
55
+ instruction parameters (interval, timeout, retries, start-period,
56
+ start-interval), health check states (starting, healthy, unhealthy),
57
+ common health check failures (missing tools, wrong endpoint, timing),
58
+ how to design good health check endpoints, and health check debugging
59
+ with docker inspect.
60
+
61
+ assertions:
62
+ - type: llm_judge
63
+ criteria: "HEALTHCHECK parameters are explained — interval: time between checks (default 30s), timeout: max time for check to complete (default 30s), retries: consecutive failures before unhealthy (default 3), start-period: grace period where failures don't count (default 0s), start-interval: check frequency during start-period (default 5s, Docker 25+). Total startup tolerance = start-period + (retries × interval)"
64
+ weight: 0.35
65
+ description: "HEALTHCHECK parameters"
66
+ - type: llm_judge
67
+ criteria: "Common failures are diagnosed — missing tools in image (curl/wget not installed), health endpoint returns error (wrong port, path, or status code), timing issues (app starts slowly, health check fails during startup), health check command syntax error (shell vs exec form), wrong process checked (health check hits sidecar not main app). Debug with docker inspect --format='{{json .State.Health}}'"
68
+ weight: 0.35
69
+ description: "Common failures"
70
+ - type: llm_judge
71
+ criteria: "Health endpoint design is covered — good health check: checks that the process can handle requests (not just that it's running), checks critical dependencies (database connection, cache), responds quickly (< 1 second), returns appropriate HTTP status code. Bad health check: checks that are too expensive (full database query), checks external services (makes health dependent on others), no timeout"
72
+ weight: 0.30
73
+ description: "Health endpoint design"