Komut#cc-toolkit
0
Dockerfile
Geçerli proje için optimize edilmiş çok aşamalı bir Docker dosyası oluşturun.
yazan kuscubasiece·8 Eylül 2026
Kaynak: rohitg00/awesome-claude-code-toolkit · Apache-2.0
Geçerli proje için optimize edilmiş çok aşamalı bir Docker dosyası oluşturun.
Kaynak: rohitg00/awesome-claude-code-toolkit · Apache-2.0
mkdir -p .claude/commands && curl -sL https://www.antrophiclove.com/api/kaynak/dockerfile/raw -o .claude/commands/dockerfile.mdHedef dosya: .claude/commands/dockerfile.md
Generate an optimized multi-stage Dockerfile for the current project.
Detect the project type and runtime:
package.json (Node.js), requirements.txt/pyproject.toml (Python), go.mod (Go), Cargo.toml (Rust), pom.xml/build.gradle (Java)Select the appropriate base image:
latestnode:22-alpine for runtime, node:22 for buildpython:3.12-slim for runtimegolang:1.23-alpine for build, gcr.io/distroless/static-debian12 for runtimerust:1.82-slim for build, debian:bookworm-slim for runtimeStructure the Dockerfile with these stages:
--with-tests flag is specifiedApply these optimizations:
.dockerignore patterns: suggest creating one if missingNODE_ENV=production or equivalent environment variablesCOPY --from=build to minimize final image layersLABEL instructions for maintainer, version, and descriptionEXPOSE for the application porttini or dumb-init as PID 1 for proper signal handling in Node.jsGenerate a companion .dockerignore if one does not exist, including:
.git, node_modules, __pycache__, .env, *.logWrite the Dockerfile to the project root. If a Dockerfile already exists, present a diff and ask before overwriting. Include inline annotations explaining each optimization decision.
docker build --target runtime . if Docker is available