
container-plugin
Container build and deployment plugin that enforces non-root, minimal images with Skaffold testing.
- version
- 2.11.5
- GitHub stars
- 60
What it does
- Adds
container-buildagent and skills for Docker, multi-stage builds, and Skaffold, with 3 language-specific image optimization skills - Covers Dockerfile and docker-compose work, Go, Node.js, and Python slimming (Go to 2.5MB, Node.js to ~100MB, Python to ~120MB), and Skaffold file sync and testing
- Enforces mandatory non-root users and minimal base images, with Trivy or Grype scanning and health checks for Kubernetes probes
- Designed for local Kubernetes development on OrbStack, and for release and handoff documentation around deployments
Container development and deployment - Docker, registry, Skaffold
Add marketplace
/plugin marketplace add laurigates/claude-pluginsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install container-plugin@laurigates-claude-pluginsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceContainer 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) |
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-containers | Alpine, multi-stage, npm/yarn/pnpm | 900MB → 100MB (89%) |
| Python | python-containers | Slim (NOT Alpine), uv, venv | 1GB → 100MB (90%) |
Quick Base Image Guide
Choose the right base image:
- Go:
scratchordistroless/static(2-5MB) - Node.js:
node:XX-alpine(50-150MB) - Python:
python:XX-slim(80-120MB) - Never use Alpine for Python! - Nginx:
nginx:XX-alpine(20-40MB) - Static files:
scratchornginx:alpine(minimal)
Multi-Stage Build Template
Start from the annotated builder/runtime template in references/multi-stage-template.md (non-root user, COPY --from=builder, HEALTHCHECK), then meet every requirement below.
Security Requirements (Mandatory)
- Non-root user: REQUIRED - never run as root in production
- Minimal base images: Choose smallest viable base
- Typical CVE reduction: 50-100% (full base: 50-70 CVEs → minimal: 0-12 CVEs)
- No shell = no shell injection attacks
- No package manager = no supply chain attacks
- Multi-stage builds: REQUIRED - keep build tools out of runtime
- HEALTHCHECK: REQUIRED for Kubernetes liveness/readiness probes
- Vulnerability scanning: Use Trivy, Grype, or Docker Scout in CI
- Version pinning: Always use specific tags (e.g.,
node:20.10-alpine), neverlatest - .dockerignore: REQUIRED - prevents secrets, .env, .git from entering image
Typical Impact of Full Optimization:
- Image size: 85-99% reduction
- Security: 70-100% fewer CVEs
- Pull time: 80-98% faster
- Build time: 40-60% faster (with proper caching)
- Memory usage: 60-80% lower
- Storage costs: 90-99% reduction
12-Factor App Principles
- Configuration via environment variables
- Stateless processes
- Explicit dependencies
- Port binding for services
- Graceful shutdown handling
Skaffold Preference
- Favor Skaffold over Docker Compose for local development
- Continuous development loop with hot reload
- Production-like local environment
Container Labels (OCI Annotations)
When publishing to GHCR or adding image metadata, use references/oci-labels.md: the required (org.opencontainers.image.source, .description, .licenses) and recommended labels, and how to set them in a Dockerfile, at build time, or via docker/metadata-action.
Agentic Optimizations
When building and testing containers, use these optimizations for faster feedback:
| Context | Command | Purpose |
|---|---|---|
| Quick build | DOCKER_BUILDKIT=1 docker build --progress=plain -t app . | BuildKit with plain output |
| Build with cache | docker build --cache-from app:latest -t app:new . | Reuse layers from previous builds |
| Security scan | docker scout cves app:latest | head -50 | Quick vulnerability check |
| Size analysis | docker images app --format "{{.Size}}" | Check image size |
| Layer inspection | docker history app:latest --human --no-trunc | Analyze layer sizes |
| Build without cache | docker build --no-cache --progress=plain -t app . | Force clean build |
| Test container | docker run --rm -it app:latest /bin/sh | Interactive testing |
| Quick health check | docker run --rm app:latest timeout 5 /health | Verify startup |
Build optimization flags:
--target=<stage>: Build specific stage only (faster iteration)--build-arg BUILDKIT_INLINE_CACHE=1: Enable inline cache--secret id=key,src=file: Mount secrets without including in image
For detailed Dockerfile optimization techniques, orchestration patterns, security hardening, and Skaffold configuration, see REFERENCE.md.
Related Skills
Language-Specific Container Optimization:
go-containers- Go static binaries, scratch/distroless (846MB → 2.5MB)nodejs-containers- Node.js Alpine patterns, npm/yarn/pnpm (900MB → 100MB)python-containers- Python slim (NOT Alpine), uv/poetry (1GB → 100MB)
Related Commands
/configure:container- Comprehensive container infrastructure validation/configure:dockerfile- Dockerfile-specific configuration/configure:workflows- GitHub Actions including container builds/configure:skaffold- Kubernetes development configuration
Readme
Container Plugin
A comprehensive Claude plugin for container development and deployment workflows, focusing on Docker, Skaffold, and Kubernetes.
Overview
This plugin provides expert knowledge and tooling for:
- Docker container development with security-first practices
- Multi-stage builds and image optimization
- Skaffold workflows for local Kubernetes development
- OrbStack-optimized configurations
- Deployment automation and handoff documentation
- 12-factor app methodology
Contents
Skills
container-development
Expert knowledge for containerization and orchestration with a focus on security-first, lean container images and 12-factor app methodology.
Key Features:
- Security-first philosophy (mandatory non-root users, minimal base images)
- Multi-stage Docker builds for production-ready images
- Image optimization and vulnerability scanning
- 12-factor app compliance
- Comprehensive reference documentation
Use when:
- Working with Docker, Dockerfiles, or Containerfiles
- Building container images
- Implementing container security best practices
- Following 12-factor app principles
- Optimizing container builds
Reference Documentation:
- Multi-stage build patterns
- 12-factor app principles implementation
- Security best practices
- Skaffold workflows
- Docker Compose patterns
- Performance optimization
- Advanced Dockerfile patterns
skaffold-orbstack
OrbStack-optimized Skaffold workflows for local Kubernetes development without port-forwarding.
Key Features:
- Port-forward-free development with OrbStack
- LoadBalancer auto-provisioning
- Wildcard DNS support (*.k8s.orb.local)
- Direct service access from macOS
- Ingress controller setup and configuration
Use when:
- Configuring Skaffold with OrbStack
- Accessing services via LoadBalancer or Ingress
- Eliminating port-forward complexity
- Setting up local Kubernetes development
Advantages over minikube/kind:
- Automatic LoadBalancer provisioning
- Native DNS resolution (cluster.local)
- Direct pod IP access from host
- Auto HTTPS certificates
skaffold-testing
Container image validation with Skaffold test and verify stages for robust CI/CD pipelines.
Key Features:
- Container structure tests for image hygiene
- Custom tests for security scanning (Grype, Trivy)
- Post-deployment verification with the verify stage
- Profile-based testing (quick vs thorough)
- Essential security test templates
Use when:
- Configuring pre-deploy image validation
- Setting up security scanning in CI
- Implementing post-deployment integration tests
- Creating robust container testing pipelines
Testing Lifecycle:
Build → Test → Deploy → Verify
↑ ↑
Pre-deploy Post-deploy
Test Types:
structureTests: Validate image contents (files, commands, metadata)custom: Run arbitrary commands (security scans, unit tests)verify: Post-deployment integration tests
skaffold-filesync
Fast iterative development with Skaffold file sync - copy changed files to running containers without rebuilding images.
Key Features:
- Three sync modes: manual, infer, and auto
- Hot reload support for interpreted languages
- Static asset synchronization
- Directory stripping for complex layouts
- Zero-config support for Buildpacks and Jib
Use when:
- Optimizing the development loop
- Setting up hot reload in Kubernetes
- Syncing source code to running containers
- Avoiding unnecessary image rebuilds
Sync Modes:
| Mode | Best For |
|---|---|
manual | Full control, complex directory layouts |
infer | Docker builds, derives destinations from Dockerfile |
auto | Buildpacks, Jib - zero configuration |
Speed Comparison:
Without sync: Edit → Build → Deploy → Restart (~30-60s)
With sync: Edit → Copy → Test (~1-2s)
deploy-release
Create and publish a new release with release-please automation.
Features:
- Manifest-based release configuration
- Automatic version number updates across files
- GitHub release integration
Usage:
claude chat --file ~/.claude/skills/deploy-release/SKILL.md <version> [--draft] [--prerelease]
deploy-handoff
Generate professional deployment handoff documentation for resources and services.
Features:
- Automatic repository and deployment context detection
- Professional formatting for handoff messages
- Comprehensive service documentation
- Developer handoff checklists
- Access information and monitoring links
Usage:
# Basic handoff for current project
/container:deploy-handoff
# Specific service handoff
/container:deploy-handoff "User API" "web-service"
Output includes:
- Service overview and technical details
- Access URLs and endpoints
- Documentation links
- Developer handoff checklist
- Support and contact information
Installation
Option 1: Copy to .claude directory (Manual)
# Copy the entire plugin directory
cp -r container-plugin ~/.claude/plugins/container-plugin
Option 2: Symlink (Development)
# Create symlink for development
ln -s "$(pwd)/container-plugin" ~/.claude/plugins/container-plugin
Option 3: chezmoi (Recommended)
If using chezmoi for dotfile management:
# Add to chezmoi source directory
cp -r container-plugin ~/.local/share/chezmoi/exact_dot_claude/plugins/exact_container-plugin
# Apply changes
chezmoi apply ~/.claude
Usage
Once installed, the skills and commands are automatically available in Claude Code.
Skills Activation
Skills are automatically activated when relevant keywords are detected:
container-development: Docker, Dockerfile, containers, docker-compose, multi-stage builds, container images, container security, 12-factor app
skaffold-orbstack: OrbStack, k8s.orb.local, Skaffold, service access, port-forward
skaffold-testing: skaffold test, skaffold verify, container-structure-test, image testing, security scanning, Grype, Trivy, pre-deploy validation
skaffold-filesync: file sync, hot reload, live reload, fast iteration, sync rules, copy files to container
Skill Usage
Skills can be invoked using the Claude chat interface:
# Release automation
claude chat --file ~/.claude/skills/deploy-release/SKILL.md 1.0.0
# Deployment handoff
/container:deploy-handoff "My Service" "api"
Security Philosophy
This plugin enforces strict security best practices:
Mandatory Requirements
- Non-root users: ALL production containers MUST run as non-root
- Minimal base images: Alpine (~5MB) for Node.js/Go/Rust, slim (~50MB) for Python
- Multi-stage builds: Separate build and runtime environments
- Vulnerability scanning: Trivy or Grype integration in CI
- Health checks: Required for Kubernetes probes
Image Size Guidelines
- Alpine base: ~5MB
- Debian slim: ~50-70MB
- Distroless: ~2MB (no shell)
Best Practices
Container Development
- Use multi-stage builds to minimize image size
- Run containers as non-root users
- Pin specific image versions (avoid
latest) - Implement health checks
- Follow 12-factor app principles
- Scan images for vulnerabilities
Skaffold Workflows
- Use OrbStack for superior local Kubernetes networking
- Prefer LoadBalancer services over port-forwarding
- Leverage Ingress for pretty URLs
- Configure proper health checks and readiness probes
- Use profiles for different environments
Deployment
- Generate comprehensive handoff documentation
- Include monitoring and logging information
- Document access URLs and endpoints
- Provide developer checklists
- Maintain professional communication style
Dependencies
Container Development
- Docker or compatible container runtime
- BuildKit (for cache mounts and optimizations)
- Trivy or Grype (for security scanning)
Skaffold Testing
- container-structure-test binary
- Grype or Trivy (for vulnerability scanning)
- Skaffold v2.0+ (for verify stage)
Skaffold Workflows
- OrbStack (recommended) or minikube/kind
- kubectl
- Skaffold
- Ingress controller (ingress-nginx or Traefik)
Deployment Commands
- Git
- GitHub CLI (optional, for release automation)
Related Resources
Documentation
- Docker Documentation
- Dockerfile Best Practices
- 12-Factor App
- Skaffold Documentation
- OrbStack Documentation
Security
Version
1.0.0
Keywords
container, docker, dockerfile, registry, skaffold, deployment, kubernetes, orbstack, 12-factor, multi-stage-builds, security, image-optimization, container-structure-test, grype, trivy, verify, image-testing, filesync, hot-reload, live-reload
License
This plugin is part of the claude-plugins repository and follows the same license terms.
Contributing
Contributions are welcome! Please ensure:
- New container patterns follow security best practices
- Documentation is comprehensive and clear
- Examples are tested and verified
- Skills include appropriate trigger keywords
Support
For issues, questions, or contributions:
- Check the reference documentation in each skill
- Review the examples and patterns provided
- Consult official documentation for Docker, Skaffold, and Kubernetes
- Open an issue in the claude-plugins repository
Details
- Marketplace
- laurigates/claude-plugins
- Source
- container-plugin
- Author
- Lauri Gates
- Category
- Infrastructure
- License
- MIT
- Keywords
- container, docker, registry, skaffold
- Listed since
- Apr 7, 2026
More from laurigates/claude-plugins
All 52- css-pluginv1.2.4
- documentation-pluginv1.16.1
- evaluate-pluginv1.21.1
- feedback-pluginv1.16.3
- finops-pluginv1.4.7
- foundryvtt-pluginv1.6.4
- git-pluginv2.74.4
- github-actions-pluginv1.13.8
- health-pluginv1.24.9
- home-assistant-pluginv1.4.1
- hooks-pluginv2.22.3
- kernel-pluginv1.1.1
- kitty-pluginv2.0.0
- kubernetes-pluginv1.10.4
- langchain-pluginv1.5.10
- linux-pluginv1.1.1
- macos-pluginv2.0.1
- migration-patterns-pluginv1.7.1
- networking-pluginv1.4.3
- obsidian-pluginv1.3.8
- project-pluginv1.21.17
- prompt-engineering-pluginv1.1.4
- prose-pluginv1.4.5
- python-pluginv1.5.10
Similar to container-plugin
More DevOps & Cloud
kubernetes-pluginPluginlaurigates/claude-plugins60 starsKubernetes and Helm operations - deployments, charts, releases
docker-toolkitPluginarmanzeroeight/fastagent-plugins29 starsDocker containerization toolkit for image optimization, security scanning, and container best practices. Includes container architect agent for strategic contai
docker-wizardPluginglincker/claude-code-marketplace38 starsGenerate optimized Dockerfiles and docker-compose.yml with best practices
deploy-pilotPluginrohitg00/awesome-claude-code-toolkit2.8K starsDeployment automation with Dockerfile generation, CI/CD pipelines, and infrastructure as code
configure-pluginPluginlaurigates/claude-plugins60 starsProject infrastructure standards - pre-commit, CI/CD, Docker, testing configuration
Containerization AssistMCP serverazure45 starsContainerize, scan, and deploy Docker images and Kubernetes manifests through AI-guided tools.