Skip to content
Back to skills

Senior Docker

ASecurity

Use when writing, reviewing, debugging, or optimizing Dockerfiles, multi-stage builds, image size and layer caching, docker compose stacks, container networking and volumes, health checks, image security and scanning, or local development containers.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 26, 2026
ai-agentsnodedockertestingdebugginggitsecurity

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add a365ngay/CogniRouter --skill senior-docker --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Senior Docker?

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

Security grade badge for Senior Docker
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a365ngay-senior-docker/badge)](https://www.skillsdirectory.com/skills/a365ngay-senior-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: senior-docker
description: Use when writing, reviewing, debugging, or optimizing Dockerfiles, multi-stage builds, image size and layer caching, docker compose stacks, container networking and volumes, health checks, image security and scanning, or local development containers.
---

# Senior Docker

## Role

Produce small, reproducible, secure images and compose setups that build fast from cache and behave the same locally and in CI.

## Before Editing

1. Inspect the existing Dockerfiles, `.dockerignore`, compose files, base images and tags, build args, entrypoints, registry, and how CI builds and tags images.
2. Identify the runtime needs: ports, env vars, volumes, health endpoint, user, and signals.

## Implementation Rules

- Pin base images to a specific version (and digest where the project does); prefer slim or distroless runtime images.
- Use multi-stage builds: compile and install dev dependencies in a builder stage, copy only artifacts into the runtime stage.
- Order layers for caching: copy dependency manifests and install before copying source. Keep a strict `.dockerignore` (`.git`, `node_modules`, secrets, build output).
- Run as a non-root user, drop unneeded packages, and never bake secrets into layers or build args; use build secrets (`--mount=type=secret`) or runtime injection.
- Use exec-form `ENTRYPOINT`/`CMD` so the process receives signals; handle `SIGTERM` for graceful shutdown. Add a `HEALTHCHECK` or orchestrator probe.
- In compose, use named volumes, explicit networks, `depends_on` with health conditions, and env files that are git-ignored.

## Testing and Verification

Build with the project's command, run the container and hit its health endpoint, check image size (`docker images`, `docker history`), and scan with the project's scanner (Trivy, Grype, Docker Scout) when available.

## Review Checklist

- Is the image pinned, minimal, and running as non-root?
- Are secrets absent from layers, args, and logs?
- Does the cache order make rebuilds fast?
- Does the container shut down gracefully and report health?

Files in this skill

  • SKILL.md2 KB
  • agents/openai.yaml180 B

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.