Back to skills
SKILL.md
Docker
ASecurityContainers — minimal multi-stage Dockerfiles, layer caching, non-root users, pinned base images by digest, health checks, signals and PID 1, image scanning, SBOM, compose for local development. Use to write or review container images (Docker, Dockerfile, container image, multi-stage, distroless).
- 5 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Security analysis
100/100npx -y skills add vectora-os/kit --skill docker --agent claude-codeAre you the author of Docker?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-docker)---
name: docker
description: Containers — minimal multi-stage Dockerfiles, layer caching, non-root users, pinned base images by digest, health checks, signals and PID 1, image scanning, SBOM, compose for local development. Use to write or review container images (Docker, Dockerfile, container image, multi-stage, distroless).
metadata:
category: infrastructure
---
# Docker
## Purpose
Build small, secure, reproducible container images.
**Use when:** containerizing services.
**Not for:** orchestration (`kubernetes`).
## Inputs
- Application, runtime needs.
## Outputs
- Dockerfile, compose file, scan results.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "docker"` for prior decisions, patterns and anti-patterns.
- [Security standard](../../../standards/security.md)
## Steps
1. **Build.** Multi-stage: build deps in builder, copy artifacts to minimal runtime.
Done when runtime image has no compilers.
2. **Pin.** Base images pinned by digest; lockfile installs.
Done when builds are reproducible.
3. **Harden.** Non-root user, read-only FS where possible, no secrets in layers.
Done when scan shows no critical CVEs.
4. **Run.** Handle SIGTERM; health check; one process.
Done when graceful shutdown works.
## Best practices
- Order layers from least to most frequently changing.
- Use `.dockerignore`.
## Common mistakes
- Secrets in `ARG`/`ENV`.
- `latest` tags.
## Example
Node service: builder on node:XX, runtime distroless, 1.1 GB → 95 MB, non-root, SBOM attached.
## Reusable prompt
```text
Apply the Docker skill (.agents/skills/docker/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Write or review the Dockerfile for minimal size, pinning, hardening and graceful shutdown.
Return: Dockerfile, compose file, scan results..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.