From claude-resources
Containerization principles — multi-stage builds, base image selection, layer caching, security. Use when containerizing a service, shrinking a bloated image, chasing CVEs in a base image, adding non-root + distroless to an existing Dockerfile, or reviewing any `Dockerfile` / `.dockerignore` changes. Trigger on any task mentioning "docker", "container", "image", "base image", or "deploy to kubernetes" — even when the user does not explicitly say "use the docker skill". Pair with language-specific docker skill for build patterns.
npx claudepluginhub deandum/claude-resources --plugin go-skillsThis skill uses the workspace's default tool permissions.
Build small, secure, production-ready containers.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
Build small, secure, production-ready containers.
<lang>/docker skill)| Image Type | Size | Use Case |
|---|---|---|
| scratch | ~0MB | Static binaries only |
| distroless/static | ~2MB | Static binaries, better debugging |
| distroless/base | ~20MB | Binaries needing libc |
| alpine | ~5MB | Need shell/debugging tools |
| debian:slim | ~70MB | Complex dependencies |
Default: distroless/static for production. Alpine for development/debugging.
Size reduction: 90-95% vs single-stage builds.
Order for maximum cache reuse:
Code-only changes reuse cached dependency layers.
:latest — pin base image versions + digests--mount=type=secret, not ARG/ENVExclude: .git, docs, tests, IDE files, .env, build artifacts, node_modules/vendor, Dockerfile itself.
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD ["/app", "healthcheck"]
Use OCI labels and build args for version, commit, build date. Enables traceability from running container back to source.
| Application Type | Target Size |
|---|---|
| Static binary (Go, Rust) | <20MB |
| Node.js | <150MB |
| Python | <200MB |
| Java | <250MB |
If significantly over target, investigate unnecessary dependencies or wrong base image.
| Shortcut | Reality |
|---|---|
| "Just use :latest" | Unpinned images break reproducibility. Pin versions + digests. |
| "Root is easier" | Root in containers = privilege escalation risk. Always non-root. |
| "One stage is simpler" | Single-stage ships the entire SDK. Multi-stage shrinks 90-95%. |
| "Security scanning is overkill" | Known CVEs in base images are free attack surface. Scan in CI. |
:latest or unpinned base image tags