dojo.md 0.1.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.
- package/courses/GENERATION_LOG.md +72 -0
- package/courses/api-error-handling/course.yaml +16 -0
- package/courses/api-error-handling/scenarios/level-1/error-response-format.yaml +131 -0
- package/courses/api-error-handling/scenarios/level-1/http-status-codes-basics.yaml +90 -0
- package/courses/api-error-handling/scenarios/level-1/rate-limiting-basics.yaml +135 -0
- package/courses/api-error-handling/scenarios/level-1/request-validation-errors.yaml +208 -0
- package/courses/api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +189 -0
- package/courses/api-error-handling/scenarios/level-2/idempotency-retry-logic.yaml +159 -0
- package/courses/api-error-handling/scenarios/level-2/rfc-7807-problem-details.yaml +178 -0
- package/courses/api-error-handling/scenarios/level-2/webhook-error-handling.yaml +211 -0
- package/courses/api-error-handling/scenarios/level-3/distributed-tracing-errors.yaml +275 -0
- package/courses/aws-lambda-debugging/course.yaml +11 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/api-gateway-integration.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cloudwatch-logs-basics.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cold-start-basics.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/environment-variable-issues.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/first-debugging-shift.yaml +73 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/handler-import-errors.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/iam-permission-errors.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/invocation-errors.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/lambda-timeout-errors.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/memory-and-oom.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/async-invocation-failures.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/cold-start-optimization.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/dynamodb-streams-debugging.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-concurrency-management.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-layers-debugging.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sam-local-debugging.yaml +74 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sqs-event-source.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/vpc-networking-issues.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/xray-tracing.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/advanced-debugging-shift.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/container-image-lambda.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/cross-account-invocation.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/eventbridge-patterns.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/iac-deployment-debugging.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/kinesis-stream-processing.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-at-edge.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-extensions-debugging.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/powertools-observability.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/step-functions-debugging.yaml +80 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/cost-optimization-strategy.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/expert-debugging-shift.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/incident-management-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/multi-region-serverless.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/observability-platform-design.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-architecture-design.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-data-architecture.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-migration-strategy.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-security-design.yaml +60 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-testing-strategy.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/board-serverless-strategy.yaml +63 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/consulting-serverless-adoption.yaml +57 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/industry-serverless-patterns.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/ma-serverless-integration.yaml +75 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/master-debugging-shift.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/organizational-serverless-transformation.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/regulatory-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-economics.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-future-technology.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-platform-design.yaml +71 -0
- package/courses/docker-container-debugging/course.yaml +11 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-exit-codes.yaml +59 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-networking-basics.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-1/docker-logs-debugging.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/dockerfile-build-failures.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-1/environment-variable-issues.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-1/first-debugging-shift.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/image-pull-failures.yaml +68 -0
- package/courses/docker-container-debugging/scenarios/level-1/port-mapping-issues.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/resource-limits-oom.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/volume-mount-problems.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/container-health-checks.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-compose-debugging.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-exec-debugging.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/image-layer-optimization.yaml +81 -0
- package/courses/docker-container-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/logging-and-log-rotation.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/multi-stage-build-debugging.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/network-debugging-tools.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-2/pid1-signal-handling.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/security-scanning-basics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/advanced-debugging-shift.yaml +77 -0
- package/courses/docker-container-debugging/scenarios/level-3/buildkit-optimization.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-filesystem-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-security-hardening.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/disk-space-management.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-api-automation.yaml +72 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-daemon-issues.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-in-docker-ci.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-3/overlay-network-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/production-container-ops.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-4/cicd-pipeline-design.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-monitoring-observability.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-orchestration-strategy.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-performance-engineering.yaml +64 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-security-architecture.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/enterprise-image-management.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-4/expert-debugging-shift.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/incident-response-containers.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-4/multi-environment-management.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-4/stateful-service-containers.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-5/board-infrastructure-strategy.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-5/consulting-container-strategy.yaml +61 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-architecture.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-economics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-technology-evolution.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/disaster-recovery-containers.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-5/industry-container-patterns.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-5/master-debugging-shift.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-5/organizational-transformation.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/regulatory-compliance-containers.yaml +61 -0
- package/courses/github-actions-cicd/course.yaml +10 -0
- package/courses/github-actions-cicd/scenarios/level-1/actions-and-runners.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-1/basic-workflow-syntax.yaml +52 -0
- package/courses/github-actions-cicd/scenarios/level-1/branch-protection-checks.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-1/environment-variables-secrets.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-1/first-cicd-shift.yaml +62 -0
- package/courses/github-actions-cicd/scenarios/level-1/job-dependencies-outputs.yaml +62 -0
- package/courses/github-actions-cicd/scenarios/level-1/simple-ci-pipeline.yaml +57 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-debugging.yaml +90 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-status-notifications.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-triggers.yaml +56 -0
- package/courses/github-actions-cicd/scenarios/level-2/concurrency-control.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-2/conditional-execution.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-2/custom-actions-development.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-2/dependency-caching.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-2/deployment-workflows.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-2/github-packages-publishing.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-2/intermediate-cicd-shift.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-2/matrix-builds.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-2/reusable-workflows.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-2/workflow-cost-optimization.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-3/advanced-cicd-shift.yaml +64 -0
- package/courses/github-actions-cicd/scenarios/level-3/compliance-automation.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-3/docker-action-development.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-3/github-environments.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-3/monorepo-ci.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-3/oidc-cloud-deployments.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-3/release-automation.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-3/security-hardening.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-3/self-hosted-runners.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-3/workflow-optimization.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-data-architecture.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-economics-roi.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-executive-communication.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-incident-response.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-org-design.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-platform-architecture.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-training-program.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-vendor-evaluation.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/enterprise-cicd-governance.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-4/expert-cicd-shift.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-ai-future.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-behavioral-science.yaml +70 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-board-strategy.yaml +56 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-consulting-engagement.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-industry-benchmarks.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-ma-integration.yaml +73 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-product-development.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-regulatory-landscape.yaml +72 -0
- package/courses/github-actions-cicd/scenarios/level-5/comprehensive-cicd-system.yaml +66 -0
- package/courses/github-actions-cicd/scenarios/level-5/master-cicd-shift.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-2/api-change-review.yaml +82 -0
- package/courses/github-pr-review/scenarios/level-2/automated-review-tooling.yaml +53 -0
- package/courses/github-pr-review/scenarios/level-2/cross-team-review.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-2/intermediate-review-shift.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-2/performance-review-patterns.yaml +99 -0
- package/courses/github-pr-review/scenarios/level-2/review-disagreement-resolution.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-2/review-metrics-analysis.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-2/review-turnaround-sla.yaml +54 -0
- package/courses/github-pr-review/scenarios/level-2/stacked-pr-review.yaml +65 -0
- package/courses/github-pr-review/scenarios/level-3/advanced-review-shift.yaml +65 -0
- package/courses/github-pr-review/scenarios/level-3/ai-powered-review.yaml +58 -0
- package/courses/github-pr-review/scenarios/level-3/compliance-review-process.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-3/cross-functional-review.yaml +60 -0
- package/courses/github-pr-review/scenarios/level-3/incident-driven-review.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-3/large-scale-review-operations.yaml +55 -0
- package/courses/github-pr-review/scenarios/level-3/monorepo-review-process.yaml +68 -0
- package/courses/github-pr-review/scenarios/level-3/review-automation-platform.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-3/review-culture-design.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-3/review-data-pipeline.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/enterprise-review-operations.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-4/expert-review-shift.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/review-data-architecture.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-4/review-economics-roi.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-4/review-executive-communication.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-4/review-incident-postmortem.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-4/review-org-design.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/review-platform-architecture.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-4/review-training-program.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-4/review-vendor-evaluation.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-5/comprehensive-review-system.yaml +68 -0
- package/courses/github-pr-review/scenarios/level-5/master-review-shift.yaml +73 -0
- package/courses/github-pr-review/scenarios/level-5/review-ai-future.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-5/review-behavioral-science.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-5/review-board-strategy.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-5/review-consulting-engagement.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-5/review-devtools-product.yaml +71 -0
- package/courses/github-pr-review/scenarios/level-5/review-industry-benchmarks.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-5/review-ma-integration.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-5/review-regulatory-landscape.yaml +78 -0
- package/courses/kubernetes-deployment-troubleshooting/course.yaml +12 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/configmap-secret-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/crashloopbackoff.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/deployment-rollout.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/first-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/health-probe-failures.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/imagepullbackoff.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/kubectl-debugging-basics.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/oomkilled.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/pending-pods.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/service-not-reachable.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/dns-resolution-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/helm-deployment-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/hpa-scaling-issues.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/ingress-routing-issues.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/init-container-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/intermediate-troubleshooting-shift.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/network-policy-blocking.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/persistent-volume-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/rbac-permission-denied.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/resource-quota-limits.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/advanced-troubleshooting-shift.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/cluster-upgrade-failures.yaml +71 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/gitops-drift-detection.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/job-cronjob-failures.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/monitoring-alerting-gaps.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/multi-container-debugging.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/node-pressure-evictions.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/pod-disruption-budgets.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/service-mesh-debugging.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/statefulset-troubleshooting.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/capacity-planning.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/cost-optimization.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/disaster-recovery-design.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/executive-communication.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/expert-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/incident-management-process.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-cluster-operations.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-tenancy-design.yaml +55 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/platform-engineering.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/security-hardening.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/behavioral-science.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/board-strategy.yaml +61 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/cloud-native-future.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/comprehensive-platform.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/consulting-engagement.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/industry-benchmarks.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/ma-integration.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/master-troubleshooting-shift.yaml +73 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/product-development.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/regulatory-compliance.yaml +76 -0
- package/courses/mysql-query-optimization/course.yaml +11 -0
- package/courses/mysql-query-optimization/scenarios/level-1/buffer-pool-basics.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/explain-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-1/innodb-index-fundamentals.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/join-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/select-star-problems.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-2/buffer-pool-tuning.yaml +64 -0
- package/courses/mysql-query-optimization/scenarios/level-2/composite-index-design.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-2/covering-and-invisible-indexes.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/cte-and-window-functions.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-2/join-optimization.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-2/performance-schema-analysis.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/query-optimizer-hints.yaml +74 -0
- package/courses/mysql-query-optimization/scenarios/level-2/subquery-optimization.yaml +70 -0
- package/courses/mysql-query-optimization/scenarios/level-2/write-optimization.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-3/connection-management.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-3/full-text-search.yaml +77 -0
- package/courses/mysql-query-optimization/scenarios/level-3/json-optimization.yaml +87 -0
- package/courses/mysql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-3/monitoring-alerting.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/online-schema-changes.yaml +79 -0
- package/courses/mysql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +83 -0
- package/courses/mysql-query-optimization/scenarios/level-3/query-profiling-deep-dive.yaml +84 -0
- package/courses/mysql-query-optimization/scenarios/level-3/replication-optimization.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-4/aurora-vs-rds-evaluation.yaml +61 -0
- package/courses/mysql-query-optimization/scenarios/level-4/data-architecture.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/database-migration-planning.yaml +59 -0
- package/courses/mysql-query-optimization/scenarios/level-4/enterprise-governance.yaml +50 -0
- package/courses/mysql-query-optimization/scenarios/level-4/executive-communication.yaml +54 -0
- package/courses/mysql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +60 -0
- package/courses/mysql-query-optimization/scenarios/level-4/optimizer-internals.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/performance-sla-design.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-4/read-replica-scaling.yaml +51 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ai-database-future.yaml +45 -0
- package/courses/mysql-query-optimization/scenarios/level-5/behavioral-science.yaml +44 -0
- package/courses/mysql-query-optimization/scenarios/level-5/benchmark-design.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/board-strategy.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/comprehensive-platform.yaml +49 -0
- package/courses/mysql-query-optimization/scenarios/level-5/consulting-engagement.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ma-database-integration.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +56 -0
- package/courses/mysql-query-optimization/scenarios/level-5/product-development.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/regulatory-compliance.yaml +48 -0
- package/courses/postgresql-query-optimization/course.yaml +11 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/explain-analyze-basics.yaml +80 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +77 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/index-fundamentals.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/join-basics.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/select-star-problems.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/vacuum-and-statistics.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/autovacuum-tuning.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/composite-index-design.yaml +81 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/covering-indexes.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/cte-optimization.yaml +83 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +66 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/join-optimization.yaml +72 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/partial-and-expression-indexes.yaml +75 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/query-planner-settings.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/subquery-optimization.yaml +67 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/window-function-optimization.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/connection-pooling.yaml +60 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/full-text-search-optimization.yaml +66 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/jsonb-optimization.yaml +88 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +80 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/materialized-view-optimization.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/parallel-query-execution.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/specialized-index-types.yaml +67 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/write-optimization.yaml +65 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/data-architecture-analytics.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/database-executive-communication.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/database-migration-planning.yaml +57 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/enterprise-database-governance.yaml +52 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/optimizer-internals.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/performance-sla-design.yaml +58 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/read-replica-optimization.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/vendor-evaluation.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/comprehensive-database-system.yaml +70 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ai-future.yaml +81 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-behavioral-science.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-board-strategy.yaml +77 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-consulting-engagement.yaml +61 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-industry-benchmarks.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ma-integration.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-product-development.yaml +72 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-regulatory-landscape.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +66 -0
- package/courses/rest-api-error-handling/course.yaml +11 -0
- package/courses/rest-api-error-handling/scenarios/level-1/authentication-errors.yaml +71 -0
- package/courses/rest-api-error-handling/scenarios/level-1/content-negotiation-errors.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-1/error-logging-basics.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-1/error-response-format.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-1/first-error-handling-shift.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-1/http-status-codes.yaml +46 -0
- package/courses/rest-api-error-handling/scenarios/level-1/not-found-errors.yaml +52 -0
- package/courses/rest-api-error-handling/scenarios/level-1/rate-limiting-errors.yaml +56 -0
- package/courses/rest-api-error-handling/scenarios/level-1/request-validation-errors.yaml +59 -0
- package/courses/rest-api-error-handling/scenarios/level-1/server-error-handling.yaml +55 -0
- package/courses/rest-api-error-handling/scenarios/level-2/api-versioning-errors.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-2/batch-request-errors.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +52 -0
- package/courses/rest-api-error-handling/scenarios/level-2/error-code-taxonomy.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-2/error-monitoring-alerting.yaml +53 -0
- package/courses/rest-api-error-handling/scenarios/level-2/intermediate-error-shift.yaml +69 -0
- package/courses/rest-api-error-handling/scenarios/level-2/pagination-errors.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-2/retry-and-idempotency.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-2/rfc7807-problem-details.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-2/webhook-error-handling.yaml +55 -0
- package/courses/rest-api-error-handling/scenarios/level-3/advanced-error-shift.yaml +72 -0
- package/courses/rest-api-error-handling/scenarios/level-3/api-gateway-errors.yaml +71 -0
- package/courses/rest-api-error-handling/scenarios/level-3/async-api-errors.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-3/caching-error-scenarios.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-3/chaos-engineering-apis.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-3/database-error-handling.yaml +79 -0
- package/courses/rest-api-error-handling/scenarios/level-3/distributed-error-propagation.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-3/error-budgets-sre.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-3/error-correlation.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-3/graphql-vs-rest-errors.yaml +73 -0
- package/courses/rest-api-error-handling/scenarios/level-4/compliance-error-handling.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/enterprise-error-governance.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-analytics-platform.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-cost-optimization.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-executive-communication.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-handling-architecture.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-org-design.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-sla-design.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-training-program.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-4/expert-error-shift.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-5/comprehensive-error-system.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-ai-future.yaml +75 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-behavioral-science.yaml +73 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-board-strategy.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-consulting-engagement.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-industry-benchmarks.yaml +72 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-ma-integration.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-product-development.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-regulatory-landscape.yaml +80 -0
- package/courses/rest-api-error-handling/scenarios/level-5/master-error-shift.yaml +73 -0
- package/courses/terraform-infrastructure-setup/course.yaml +11 -0
- package/courses/terraform-infrastructure-setup/scenarios/level-1/terraform-init-errors.yaml +72 -0
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +6 -5
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +4 -0
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +6 -18
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/train.d.ts.map +1 -1
- package/dist/cli/commands/train.js +18 -18
- package/dist/cli/commands/train.js.map +1 -1
- package/dist/cli/index.js +93 -55
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/run-demo.js +2 -1
- package/dist/cli/run-demo.js.map +1 -1
- package/dist/cli/setup.d.ts +18 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +154 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/engine/agent-bridge.d.ts +5 -2
- package/dist/engine/agent-bridge.d.ts.map +1 -1
- package/dist/engine/agent-bridge.js +36 -9
- package/dist/engine/agent-bridge.js.map +1 -1
- package/dist/engine/loader.d.ts +21 -0
- package/dist/engine/loader.d.ts.map +1 -1
- package/dist/engine/loader.js +54 -1
- package/dist/engine/loader.js.map +1 -1
- package/dist/engine/training-loop.d.ts.map +1 -1
- package/dist/engine/training-loop.js +1 -0
- package/dist/engine/training-loop.js.map +1 -1
- package/dist/engine/training.d.ts.map +1 -1
- package/dist/engine/training.js +1 -0
- package/dist/engine/training.js.map +1 -1
- package/dist/generator/skill-generator.d.ts +1 -1
- package/dist/generator/skill-generator.d.ts.map +1 -1
- package/dist/generator/skill-generator.js +21 -2
- package/dist/generator/skill-generator.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +11 -26
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-manager.d.ts +9 -4
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +65 -28
- package/dist/mcp/session-manager.js.map +1 -1
- package/dist/types/schemas.d.ts +38 -13
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +9 -5
- package/dist/types/schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -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"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: docker-compose-debugging
|
|
3
|
+
level: 2
|
|
4
|
+
course: docker-container-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Docker Compose issues — diagnose service dependency failures, health check misconfigurations, and environment variable problems"
|
|
7
|
+
tags: [Docker, Docker-Compose, dependencies, health-checks, services, intermediate]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Docker Compose application has 4 services but only 2 start
|
|
13
|
+
correctly:
|
|
14
|
+
|
|
15
|
+
$ docker compose up -d
|
|
16
|
+
$ docker compose ps
|
|
17
|
+
NAME SERVICE STATUS PORTS
|
|
18
|
+
api api Up (unhealthy) 0.0.0.0:8080->8080/tcp
|
|
19
|
+
db db Up (healthy) 5432/tcp
|
|
20
|
+
redis redis exited (1)
|
|
21
|
+
worker worker waiting
|
|
22
|
+
|
|
23
|
+
Problems:
|
|
24
|
+
1. redis exited with code 1:
|
|
25
|
+
$ docker compose logs redis
|
|
26
|
+
Fatal: Could not read config file '/etc/redis/custom.conf': No such file
|
|
27
|
+
|
|
28
|
+
The compose file mounts a config file that doesn't exist:
|
|
29
|
+
volumes:
|
|
30
|
+
- ./redis.conf:/etc/redis/custom.conf
|
|
31
|
+
|
|
32
|
+
2. worker is waiting because depends_on has condition: service_healthy
|
|
33
|
+
for redis, which exited (never became healthy).
|
|
34
|
+
|
|
35
|
+
3. api shows "unhealthy" — the health check fails:
|
|
36
|
+
healthcheck:
|
|
37
|
+
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
38
|
+
But curl isn't installed in the API image. The health endpoint works
|
|
39
|
+
fine — the health CHECK command fails.
|
|
40
|
+
|
|
41
|
+
4. Hidden issue: the API reads REDIS_URL from environment but the
|
|
42
|
+
compose file sets REDIS_HOST instead:
|
|
43
|
+
environment:
|
|
44
|
+
- REDIS_HOST=redis
|
|
45
|
+
- REDIS_PORT=6379
|
|
46
|
+
|
|
47
|
+
Task: Explain Docker Compose debugging. Write: how depends_on with
|
|
48
|
+
health checks works (condition: service_healthy vs service_started),
|
|
49
|
+
how to debug health check failures, environment variable patterns in
|
|
50
|
+
Compose (environment, env_file, variable substitution), common
|
|
51
|
+
Compose configuration mistakes, and the docker compose debugging
|
|
52
|
+
commands (logs, ps, config, exec).
|
|
53
|
+
|
|
54
|
+
assertions:
|
|
55
|
+
- type: llm_judge
|
|
56
|
+
criteria: "Service dependencies are explained — depends_on with condition: service_started only waits for container to start (not ready), condition: service_healthy waits for health check to pass. If a dependency exits or stays unhealthy, dependent services won't start. Health checks need: test command, interval, timeout, retries, start_period. The test command must work inside the container (tools must be installed)"
|
|
57
|
+
weight: 0.35
|
|
58
|
+
description: "Service dependencies"
|
|
59
|
+
- type: llm_judge
|
|
60
|
+
criteria: "Debugging workflow is practical — docker compose config validates and shows the resolved YAML (catches syntax errors, shows interpolated variables), docker compose logs <service> shows service logs, docker compose ps shows health status, docker compose exec <service> sh for interactive debugging, docker compose up --build to rebuild images, docker compose down -v for clean restart"
|
|
61
|
+
weight: 0.35
|
|
62
|
+
description: "Debugging workflow"
|
|
63
|
+
- type: llm_judge
|
|
64
|
+
criteria: "Environment and common mistakes are covered — Compose environment sources: environment key (inline), env_file (.env file reference), shell variables with ${VAR} substitution, .env file auto-loaded for Compose variables. Common mistakes: wrong env var name, missing env file, volume mount source doesn't exist (Docker creates directory), health check command not available in image, circular dependencies"
|
|
65
|
+
weight: 0.30
|
|
66
|
+
description: "Environment and mistakes"
|