Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

container-development

FreeNo executable scriptsNot checked

Dockerfiles and containers — multi-stage builds, non-root, slim images, CVE/Trivy fixes in a base image. Use when writing or patching a Dockerfile…

laurigatesby laurigates★ 61 GitHub stars

About 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

  1. Analyze: Understand application dependencies and build process
  2. Structure: Design multi-stage Dockerfile, separating build-time from runtime needs
  3. Ignore: Create comprehensive .dockerignore file
  4. Build & Scan: Build image and scan for vulnerabilities
  5. Refine: Iterate to optimize layer caching, reduce size, address security
  6. 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:

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
Full SKILL.md on GitHub

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
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

Glob
Grep
Read
Bash(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 *)
Edit
Write
TodoWrite
WebSearch
WebFetch

Bundled files

REFERENCE.mdreferences/cve-patching.mdreferences/multi-stage-template.mdreferences/oci-labels.md

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

Compare container-development with