Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/Git & Pull Requests
github avatar

Multi Stage Dockerfile

github/awesome-copilotOfficial

The multi-stage-dockerfile skill helps developers create optimized Docker container images by guiding them through best practices for multi-stage builds, base image selection, layer optimization, and security hardening. It addresses the problem of bloated, insecure, or inefficient container images by providing specific techniques for separating build and runtime stages, minimizing final image size, and reducing security vulnerabilities. This skill is for software developers and DevOps engineers working with containerized applications across any language or framework who want to improve build efficiency and image quality.

installs
29.8K
GitHub stars
40.5K
last updated
Aug 21, 2026
View on GitHubSave

Install

$ npx -y skills add github/awesome-copilot --skill multi-stage-dockerfile --agent claude-code

Installs into .claude/skills of the current project.

Files

Your goal is to help me create efficient multi-stage Dockerfiles that follow best practices, resulting in smaller, more secure container images.

Multi-Stage Structure

  • Use a builder stage for compilation, dependency installation, and other build-time operations
  • Use a separate runtime stage that only includes what's needed to run the application
  • Copy only the necessary artifacts from the builder stage to the runtime stage
  • Use meaningful stage names with the AS keyword (e.g., FROM node:18 AS builder)
  • Place stages in logical order: dependencies → build → test → runtime

Base Images

  • Start with official, minimal base images when possible
  • Specify exact version tags to ensure reproducible builds (e.g., python:3.11-slim not just python)
  • Consider distroless images for runtime stages where appropriate
  • Use Alpine-based images for smaller footprints when compatible with your application
  • Ensure the runtime image has the minimal necessary dependencies

Layer Optimization

  • Organize commands to maximize layer caching
  • Place commands that change frequently (like code changes) after commands that change less frequently (like dependency installation)
  • Use .dockerignore to prevent unnecessary files from being included in the build context
  • Combine related RUN commands with && to reduce layer count
  • Consider using COPY --chown to set permissions in one step

Security Practices

  • Avoid running containers as root - use USER instruction to specify a non-root user
  • Remove build tools and unnecessary packages from the final image
  • Scan the final image for vulnerabilities
  • Set restrictive file permissions
  • Use multi-stage builds to avoid including build secrets in the final image

Performance Considerations

  • Use build arguments for configuration that might change between environments
  • Leverage build cache efficiently by ordering layers from least to most frequently changing
  • Consider parallelization in build steps when possible
  • Set appropriate environment variables like NODE_ENV=production to optimize runtime behavior
  • Use appropriate healthchecks for the application type with the HEALTHCHECK instruction

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/github/awesome-copilot
Categories
Git & Pull Requests, AI & Agent Building

More from github/awesome-copilot

All 318
  • Documentation Writer27.9K
  • Prd24.1K
  • Refactor22.4K
  • Java Springboot21.4K
  • Gh Cli21.2K
  • Create Readme19.1K
  • Playwright Generate Test18.2K
  • Github Issues17.5K
  • Conventional Commit17.1K
  • Postgresql Optimization16.5K
  • Dotnet Best Practices15.8K
  • Sql Optimization15.8K
  • Chrome Devtools15.3K
  • Microsoft Docs14.9K
  • Playwright Explore Website14.8K
  • Azure Devops Cli14.6K
  • Nuget Manager14.4K
  • Microsoft Code Reference14.3K
  • Sql Code Review14.1K
  • Web Design Reviewer14K
  • Playwright Automation Fill In Form13.7K
  • Create Specification13.5K
  • Game Engine13.2K
  • Javascript Typescript Jest13.2K

Recommended

More Git & Pull Requests
1github avatardocumentation-writergithub/awesome-copilotDiátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure o27.9Kinstalls
2github avatarprdgithub/awesome-copilotGenerate high-quality Product Requirements Documents (PRDs) for software systems and AI-powered features. Includes executive summaries, user stories, technical 24.1Kinstalls
3github avatarrefactorgithub/awesome-copilotSurgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, im22.4Kinstalls
4github avatarjava-springbootgithub/awesome-copilotGet best practices for developing applications with Spring Boot.21.4Kinstalls
5github avatargh-cligithub/awesome-copilotGitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and 21.2Kinstalls
6github avatarcreate-readmegithub/awesome-copilotCreate a README.md file for the project19.1Kinstalls