mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
Add language context snippets for markdown, yaml, json, sql, dockerfile, terraform, graphql, protobuf, shell, html, and css. Each snippet follows the existing typescript.md/python.md pattern with Key Concepts, Notable File Patterns, Edge Patterns, and Summary Style sections. These snippets are injected into the architecture analyzer prompt to improve layer assignments for non-code files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Dockerfile Language Prompt Snippet
Key Concepts
- Multi-Stage Builds: Multiple
FROMstatements to separate build and runtime stages, reducing image size - Layer Caching: Each instruction creates a layer; order instructions from least to most frequently changing for cache efficiency
- Base Images:
FROM image:tagselects the starting image; prefer slim/alpine variants for smaller images - COPY vs ADD:
COPYfor local files (preferred),ADDfor URLs and tar extraction - Build Arguments:
ARGfor build-time variables,ENVfor runtime environment variables - Health Checks:
HEALTHCHECKinstruction for container orchestrator readiness probes - Entry Point vs CMD:
ENTRYPOINTsets the executable,CMDprovides default arguments - User Permissions:
USERinstruction to run as non-root for security - Ignore Patterns:
.dockerignoreexcludes files from the build context (like.gitignore)
Notable File Patterns
Dockerfile— Primary container image definition (at project root)Dockerfile.dev/Dockerfile.prod— Environment-specific Dockerfilesdocker-compose.yml— Multi-container application orchestrationdocker-compose.override.yml— Local development overrides.dockerignore— Build context exclusion patterns
Edge Patterns
- Dockerfile
deploysthe application entry point it packages (COPY/CMD target) - docker-compose
depends_onDockerfile(s) it references for building - Dockerfile
depends_onpackage manifests (package.json, requirements.txt) it copies for dependency installation - docker-compose services create
relatededges between co-deployed components
Summary Style
"Multi-stage Docker build producing a minimal Node.js production image with N build stages." "Docker Compose configuration orchestrating N services with shared networking and persistent volumes." "Development Dockerfile with hot-reload support and mounted source volumes."