Skip to content
Back to skills

Docker

ASecurity

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).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgonodedockerkubernetessecurity

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill docker --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docker?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docker
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-docker/badge)](https://www.skillsdirectory.com/skills/vectora-os-docker)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.