← ClaudeAtlas

create-dockerfilelisted

Create optimized, secure, production-ready Dockerfiles based on user requirements and application context.
abdullahkhawer/devops-skills · ★ 7 · DevOps & Infrastructure · score 78
Install: claude install-skill abdullahkhawer/devops-skills
# Create Dockerfile Skill Run this skill when asked to create or improve a Dockerfile for an application. ## Step 1 — Gather requirements Ask the user for all details about their Docker/container requirements. Cover at minimum: - Application language and runtime (e.g. Node.js 20, Python 3.12, Java 21) - Application type (web server, worker, CLI tool, etc.) - Entry point / startup command - Exposed ports (if any) - Environment variables needed - External dependencies or services - Target deployment environment (Kubernetes, ECS, bare Docker, etc.) - Any specific base image preferences or restrictions - Whether multi-stage builds are acceptable Also scan the current working directory for existing dependency files to infer requirements automatically: ```bash ls ``` Read any relevant files found (e.g. `package.json`, `requirements.txt`, `pom.xml`, `go.mod`, `Gemfile`, `Cargo.toml`) before composing the Dockerfile. --- ## Step 2 — Create the Dockerfile Write the Dockerfile to the working directory following these mandatory practices: ### Build & layer optimization - Order layers from least to most frequently changing (copy dependency files before source code). - Use multi-stage builds to separate build-time dependencies from the final runtime image. - Clean up package manager caches in the same `RUN` layer they are created. ### Base image - Use official, minimal base images (e.g. `alpine`, `slim`, `distroless`) unless the user specifies otherwise. - Pin base image versi