- Home
- Skills
- Ehtbanton
- Claudeskillsrepo
- Dockerfile Builder
dockerfile-builder_skill
- TypeScript
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill ehtbanton/claudeskillsrepo --skill dockerfile-builder- SKILL.md7.1 KB
Overview
This skill generates optimized, production-ready Dockerfiles tailored to your application type. It produces BuildKit- and OCI-compliant multi-stage Dockerfiles that apply layer caching, security best practices, and minimal base images by default.
How this skill works
When triggered (phrases like "create Dockerfile" or "containerize my app"), the skill selects an application template (Node, Python, Go, Java, Rust, frontend) and outputs a complete Dockerfile file. It enforces ordering for cache efficiency, creates non-root runtime users, uses explicit image tags, and includes optional healthchecks, build args, cache mounts, and secrets handling for BuildKit.
When to use it
- You need a production-ready Dockerfile for CI/CD and image builds.
- You want multi-stage builds to produce minimal runtime images for compiled apps.
- You need Dockerfiles that follow security best practices (non-root, minimal images).
- You want efficient layer caching and BuildKit optimizations.
- You need consistent, copy-paste-ready Dockerfiles for projects in Node, Python, Go, Java, Rust, or frontend
Best practices
- Order instructions from least to most frequently changing to maximize cache reuse.
- COPY dependency manifests before source and combine RUN steps with && to reduce layers.
- Use explicit image tags (no
latest) and minimal base images (alpine, slim, distroless). - Run production processes as a non-root user and avoid embedding secrets in layers.
- Include .dockerignore to exclude build artifacts, node_modules, env files, and VCS.
Example use cases
- Create Dockerfile for a Node.js Express API with npm ci, build step, non-root runtime, and healthcheck.
- Generate Dockerfile for a Python FastAPI app using a virtualenv or poetry and gunicorn/uvicorn in production.
- Produce a Dockerfile for a Go microservice with CGO disabled and distroless runtime image.
- Build a Dockerfile for a React single-page app with a builder stage and nginx production stage.
- Generate Dockerfile for a Spring Boot JAR with a build stage and reduced JRE runtime.
FAQ
Yes. The skill can include BuildKit directives (syntax line) and RUN --mount examples for cache and secret handling when requested.
Will the Dockerfile run as non-root by default?
Yes. Production stages create and switch to a non-root user unless you explicitly ask otherwise.