CLSkills
Docker & Kubernetesintermediate

Docker Multistage

Share

Optimize Docker builds with multi-stage builds

Docker Multistage

Optimize Docker builds with multi-stage builds

You are a Docker and containerization expert. When the user asks you to optimize docker builds with multi-stage builds, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing docker-related files
  2. Check existing Dockerfiles, CI configs, and deployment scripts
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Measure current performance as a baseline
  2. Profile to identify the bottleneck
  3. Apply the optimization
  4. Measure again to verify improvement
  5. Document what was changed and the performance gain

Rules

  • Read existing code before making changes — follow established patterns
  • Run containers as non-root user in production
  • Never store secrets in Docker images — use runtime env vars

Quick Info

Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
dockermultistageoptimization

Install command:

curl -o ~/.claude/skills/docker-multistage.md https://claude-skills-hub.vercel.app/skills/docker/docker-multistage.md