dockerfile-generator

Generate multi-stage Dockerfiles and .dockerignore files with security hardening and validation.

Updated Jul 4, 2026
One-click install
npx skills add https://github.com/100Thieves-team/plady-expert-skills --skill dockerfile-generator-100thieves-team
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dockerfile-generator
Source: https://github.com/100Thieves-team/plady-expert-skills/tree/main/.claude/skills/dockerfile-generator
Command: npx skills add https://github.com/100Thieves-team/plady-expert-skills --skill dockerfile-generator-100thieves-team

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Writing production-ready Dockerfiles by hand is error-prone: developers often ship oversized images, run containers as root, leak secrets into build contexts, or skip health checks. This Skill generates hardened, optimized Dockerfiles and .dockerignore files through a deterministic workflow with built-in validation and iterative error fixing. ## Core Features & Use Cases - Multi-Stage Build Generation: Produces language-specific templates for Node.js, Python, Go, and Java that separate build and runtime stages, reducing image size by 50-85%. - Security Hardening: Enforces non-root users, pinned version tags, minimal base images (Alpine, distroless), and secret-free builds. - Validate-Iterate Loop: Integrates with dockerfile-validator (or hadolint/checkov fallbacks) to fix errors across up to 3 iterations, with an auditable iteration log and intentional-deviation report. - Use Case: You have a FastAPI service to deploy. Ask for a production Dockerfile and receive a multi-stage build with a non-root user, health check, .dockerignore, validation report, and optimization metrics. ## Quick Start Generate a production-ready multi-stage Dockerfile and .dockerignore for my Node.js 20 Express app that listens on port 3000.

Frequently Asked Questions about dockerfile-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a multi-stage Dockerfile for my application?

Provide your language, runtime version, entrypoint, exposed port, and package manager, and the skill generates a multi-stage Dockerfile separating build and runtime stages. It also creates a .dockerignore and validates the result before delivery.

What languages does the Dockerfile generator support?

It includes built-in templates for Node.js, Python, Go, and Java, covering frameworks like Express, FastAPI, Next.js, and Spring Boot. Other languages fall back to a generic template informed by local reference guides.

Does the generated Dockerfile follow security best practices?

Yes. Generated Dockerfiles use pinned version tags instead of :latest, create and switch to a non-root user, use minimal base images like Alpine or distroless, and avoid hardcoded secrets in favor of BuildKit secret mounts.

How is the generated Dockerfile validated?

Validation runs through the dockerfile-validator skill, with fallbacks to its local script or direct hadolint and checkov commands. Errors trigger an iterative fix loop of up to 3 passes, and unresolved warnings require a documented intentional-deviation report.

When should I not use the Dockerfile generator?

Do not use it to validate existing Dockerfiles (use dockerfile-validator), build or run containers, debug running containers, or manage images and registries. It is strictly for creating and optimizing Dockerfile configurations.

Can I build multi-platform Docker images for ARM and x86?

Yes. The skill documents Docker BuildX usage for multi-platform builds targeting linux/amd64 and linux/arm64, including platform build arguments and SBOM generation for supply chain compliance.