container-development
FreeNo executable scriptsNot checkedDockerfiles and containers — multi-stage builds, non-root, slim images, CVE/Trivy fixes in a base image. Use when writing or patching a Dockerfile…
by laurigates★ 61 GitHub starsAbout this skill
Container Development
Expert knowledge for containerization and orchestration with focus on security-first, lean container images and 12-factor app methodology.
When to Use This Skill
| Use this skill when... | Use a language-specific sibling (go-containers, nodejs-containers, python-containers) instead when... |
|---|---|
| Writing or optimizing language-agnostic Dockerfiles | Optimizing Go static binaries, Node.js Alpine builds, or Python slim images |
| Authoring multi-stage build patterns or 12-factor configuration | The image-size goal is dominated by language runtime choices (scratch, distroless, musl/glibc) |
| Hardening containers (non-root, minimal base, secrets) | Running Skaffold sync (skaffold-filesync) or OrbStack networking (skaffold-orbstack) |
| Composing services with Docker Compose | The work is purely a Skaffold pre-deploy test (skaffold-testing) |
| Fixing a CVE or Trivy finding, or a stale CA bundle, in an existing Dockerfile | — |
Security Philosophy (Non-Negotiable)
Non-Root is MANDATORY: ALL production containers MUST run as non-root users. This is not optional.
Minimal Base Images: Use Alpine (~5MB) for Node.js/Go/Rust. Use slim (~50MB) for Python (musl compatibility issues with Alpine).
Multi-Stage Builds Required: Separate build and runtime environments. Build tools should NOT be in production images.
Core Expertise
Container Image Construction
- Dockerfile/Containerfile Authoring: Clear, efficient, and maintainable container build instructions
- Multi-Stage Builds: Creating minimal, production-ready images
- Image Optimization: Reducing image size, minimizing layer count, optimizing build cache
- Security Hardening: Non-root users, minimal base images, vulnerability scanning
Container Orchestration
- Service Architecture: Microservices with proper service discovery
- Resource Management: CPU/memory limits, auto-scaling policies, resource quotas
- Health & Monitoring: Health checks, readiness probes, observability patterns
- Configuration Management: Environment variables, secrets, configuration management
Key Capabilities
- 12-Factor Adherence: Ensures containerized applications follow 12-factor principles, especially configuration and statelessness
- Health & Reliability: Implements proper health checks, readiness probes, and restart policies
- Skaffold Workflows: Structures containerized applications for efficient development loops
- Orchestration Patterns: Designs service meshes, load balancing, and container communication
- Performance Tuning: Optimizes container resource usage, startup times, and runtime performance
Image Crafting Process
- Analyze: Understand application dependencies and build process
- Structure: Design multi-stage Dockerfile, separating build-time from runtime needs
- Ignore: Create comprehensive
.dockerignorefile - Build & Scan: Build image and scan for vulnerabilities
- Refine: Iterate to optimize layer caching, reduce size, address security
- Validate: Ensure image runs correctly and adheres to 12-factor principles
Best Practices
Core Optimization Principles
1. Multi-Stage Builds (MANDATORY):
- Separate build-time dependencies from runtime
- Keep build tools out of production images
- Typical reduction: 60-90% smaller final images
2. Minimal Base Images:
- Start with the smallest base that works
- Prefer Alpine for most languages (except Python)
- Consider distroless for maximum security
3. Non-Root Users (MANDATORY):
- Always create and use non-root user
- Set UID/GID explicitly (e.g., 1001)
- Security compliance requirement
4. .dockerignore (MANDATORY):
- Exclude
.git,node_modules,__pycache__ - Prevent secrets and dev files from entering image
- Reduces build context by 90-98%
5. Layer Optimization:
- Copy dependency manifests separately from source
- Put frequently changing layers last
- Combine related RUN commands with
&&
Version Checking
CRITICAL: Before using base images, verify latest versions:
- Node.js Alpine: Check Docker Hub node for latest LTS
- Python slim: Check Docker Hub python for latest
- Go Alpine: Check Docker Hub golang for latest
- nginx Alpine: Check Docker Hub nginx
- Distroless: Check Google distroless for latest
Use WebSearch or WebFetch to verify current versions.
Language-Specific Optimization
For detailed language-specific optimization patterns, see the dedicated skills:
| Language | Skill | Key Optimization | Typical Reduction |
|---|---|---|---|
| Go | go-containers |
Static binaries, scratch/distroless | 846MB → 2.5MB (99.7%) |
| Node.js | `nodejs-contai |
Install container-development in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
GlobGrepReadBash(docker build *)Bash(docker images *)Bash(docker history *)Bash(docker scout cves *)Bash(docker inspect *)Bash(head *)Bash(jq *)Bash(trivy image *)Bash(grype *)Bash(dive *)EditWriteTodoWriteWebSearchWebFetchBundled files
FAQ
What does the container-development skill do?
Dockerfiles and containers — multi-stage builds, non-root, slim images, CVE/Trivy fixes in a base image. Use when writing or patching a Dockerfile, docker-compose, or a container scan finding.
How do I install the container-development skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the container-development skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
by Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
by Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
by Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
by Anthropic