skills-catalog/ln-731-docker-generator/SKILL.md
Generates Dockerfile and docker-compose configuration for multi-container development. Use when containerizing a project.
npx skillsauth add levnikolaevich/claude-code-skills ln-731-docker-generatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Type: L3 Worker Category: 7XX Project Bootstrap
Generates production-ready Docker configuration for containerized development.
Creates Docker infrastructure for local development and production:
| Input | Source | Description | |-------|--------|-------------| | Stack Type | ln-730 coordinator | frontend, backend-dotnet, backend-python | | Versions | Auto-detected | Node.js, .NET, Python versions | | Project Name | Directory name | Used for container naming | | Ports | Defaults or detected | Frontend: 3000, Backend: 5000/8000, DB: 5432 |
| File | Purpose | Template |
|------|---------|----------|
| Dockerfile.frontend | Frontend build & serve | dockerfile_frontend.template |
| Dockerfile.backend | Backend build & run | dockerfile_backend_dotnet.template or dockerfile_backend_python.template |
| docker-compose.yml | Service orchestration | docker_compose.template |
| .dockerignore | Build context exclusions | dockerignore.template |
| nginx.conf | Frontend proxy config | nginx.template |
Validate received configuration from coordinator:
Output: Validated configuration or error
Select appropriate templates based on stack:
| Stack | Templates Used | |-------|----------------| | Frontend only | dockerfile_frontend, nginx, dockerignore | | Backend .NET | dockerfile_backend_dotnet, docker_compose, dockerignore | | Backend Python | dockerfile_backend_python, docker_compose, dockerignore | | Full stack .NET | All of the above (dotnet variant) | | Full stack Python | All of the above (python variant) |
Replace template variables with detected values:
| Variable | Source | Example |
|----------|--------|---------|
| {{NODE_VERSION}} | package.json engines or default | 22 |
| {{DOTNET_VERSION}} | *.csproj TargetFramework | 9.0 |
| {{PYTHON_VERSION}} | pyproject.toml or default | 3.12 |
| {{PROJECT_NAME}} | Directory name | my-app |
| {{DLL_NAME}} | *.csproj AssemblyName | MyApp.Api.dll |
| {{FRONTEND_PORT}} | Default or detected | 3000 |
| {{BACKEND_PORT}} | Stack-dependent | 5000 (.NET), 8000 (Python) |
| {{BACKEND_HOST}} | Service name | backend |
| {{CMD}} | Framework-dependent | ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] (FastAPI) or ["gunicorn", "--bind", "0.0.0.0:8000", "{{PROJECT_NAME}}.wsgi:application"] (Django) |
Generate files from templates:
File Locations:
Dockerfile.frontend -> src/frontend/DockerfileDockerfile.backend -> project rootdocker-compose.yml -> project root.dockerignore -> project rootnginx.conf -> src/frontend/nginx.confRequirements:
Generated:
Requirements:
Generated:
Requirements:
Generated:
All generated files follow these guidelines:
| Practice | Implementation |
|----------|----------------|
| Non-root user | Create and use appuser (UID 1001) |
| Minimal images | Alpine/slim variants |
| Multi-stage builds | Exclude build tools from runtime |
| No secrets | Use environment variables, not hardcoded |
| Health checks | Built-in HEALTHCHECK instructions (wget/curl) |
| Specific versions | Pin base image versions (e.g., nginx:1.27-alpine) |
| Non-interactive mode | ARG DEBIAN_FRONTEND=noninteractive |
| Layer caching | Copy dependency files first, source code last |
| BuildKit cache | Use --mount=type=cache for pip |
| Python optimization | PYTHONDONTWRITEBYTECODE=1, PYTHONUNBUFFERED=1 |
Generated files must meet:
docker-compose config validates without errorslatest)| File | Purpose | |------|---------| | dockerfile_frontend.template | React/Vite multi-stage Dockerfile | | dockerfile_backend_dotnet.template | .NET multi-stage Dockerfile | | dockerfile_backend_python.template | Python multi-stage Dockerfile | | docker_compose.template | docker-compose.yml template | | dockerignore.template | .dockerignore template | | nginx.template | Nginx configuration |
docker-compose config)latest)Version: 1.2.0 Last Updated: 2026-01-21
testing
Drafts and publishes fact-checked GitHub Discussions announcements. Use for releases, updates, or project news; not for release creation or issue responses.
testing
Prepares and publishes a tagged GitHub release from repository evidence. Use for an explicit release request; not for ordinary commits, packages, or community news.
testing
Validates, commits, pushes, and remotely verifies approved repository changes. Use when publication is requested; not for releases, package publishing, or announcements.
development
Reviews standalone skills and their configured distribution surfaces before publication. Use for skill release readiness; not for product code or implementation-plan review.