Create Multistage Dockerfile
Create multi-stage Dockerfiles that separate build and runtime environments for minimal production images. Covers builder/runtime stage separation, artifact copying, scratch/distroless/alpine targets, and size comparison. Use when production images are too large, when build tools are included in the final image, when you need separate dev and prod images from one Dockerfile, or when deploying to constrained environments like edge or serverless.
Install
npx skills add pjt222/agent-almanac --skill create-multistage-dockerfilegit clone --depth 1 https://github.com/pjt222/agent-almanac.git /tmp/agent-almanac
mkdir -p ~/.claude/skills
cp -r /tmp/agent-almanac/i18n/caveman-lite/skills/create-multistage-dockerfile ~/.claude/skills/create-multistage-dockerfilePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Create Multi-Stage Dockerfile Build multi-stage Dockerfiles that produce minimal production images by separating build tooling from runtime. ## When to Use - Production images are too large (>500MB for compiled languages) - Build tools (compilers, dev headers) are included in the final image - Need separate images for development and production from one Dockerfile - Deploying to constrained environments (edge, serverless) ## Inputs - **Required**: Existing Dockerfile or project to containerize - **Required**: Language and build system (npm, pip, go build, cargo, maven) - **Optional**: Target runtime base (slim, alpine, distroless, scratch) - **Optional**: Size budget for final image ## Procedure ### Step 1: Identify Build vs Runtime Dependencies | Category | Build Stage | Runtime Stage | |---|---|---| | Compilers | gcc, g++, rustc | Not needed | | Package managers | npm, pip, cargo | Sometimes (interpreted langs) | | Dev headers | `-dev` packages | Not needed | | Source code | Full source tree | Only compiled output | | Test frameworks | jest, pytest | Not needed | ### Step 2: Structure the Multi-Stage Build The core pattern: build in a fat image, copy artifacts to a slim image.
Details
- Skill name
create-multistage-dockerfile- Repository
- pjt222/agent-almanac
- Path
i18n/caveman-lite/skills/create-multistage-dockerfile/SKILL.md- License
- MIT
- Repo updated
- 18 November 2026
- Listed in
- BehiSecc/awesome-claude-skills
FAQ
What does the Create Multistage Dockerfile skill do?
Create multi-stage Dockerfiles that separate build and runtime environments for minimal production images. Covers builder/runtime stage separation, artifact copying, scratch/distroless/alpine targets, and size comparison. Use when production images are too large, when build tools are included in the final image, when you need separate dev and prod images from one Dockerfile, or when deploying to constrained environments like edge or serverless.
How do I install the Create Multistage Dockerfile skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add pjt222/agent-almanac --skill create-multistage-dockerfile. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Create Multistage Dockerfile popular?
It lives in pjt222/agent-almanac, which has 45 GitHub stars and 4 forks, and is included in 1 curated skill list.
Related skills
Adapt Architecture
45pjt222/agent-almanac
Execute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
Adaptic
45pjt222/agent-almanac
Master skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
Add Puzzle Type
45pjt222/agent-almanac
Scaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
Create R Dockerfile
45pjt222/agent-almanac
Create a Dockerfile for R projects using rocker base images. Covers system dependency installation, R package installation, renv integration, and optimized layer ordering for fast rebuilds. Use when containerizing an R application or analysis, creating reproducible R environments, deploying R-based services (Shiny, Plumber, MCP server), or setting up consistent development environments across machines.
Create Dockerfile
45pjt222/agent-almanac
Create general-purpose Dockerfiles for Node.js, Python, Go, Rust, and Java projects. Covers base image selection, dependency installation, user permissions, COPY patterns, ENTRYPOINT vs CMD, and .dockerignore. Use when containerizing an application for the first time, creating a consistent build/runtime environment, preparing an app for cloud deployment or Docker Compose, or when no existing Dockerfile is present in the project.
Deploy Searxng
45pjt222/agent-almanac
Deploy a self-hosted SearXNG meta search engine via Docker Compose. Covers settings.yml configuration, engine selection, result proxying, Nginx frontend, persistence, and updates. Use when setting up a private search engine without tracking, aggregating results from multiple providers, running a shared search instance for a team or organisation, or replacing reliance on a single search provider.
Browse the most popular Claude skills, all devops & cloud skills, or write your own with the skills generator.