Docker hardening
Skill jakesterns/agent-skills/skills/devops/docker-hardening
Reviews Dockerfiles and container configuration for security, reproducibility, image size, runtime permissions, and deployment reliability.From its SKILL.md
npx -y skills add jakesterns/agent-skills --skill docker-hardeningAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.8 KB, as published. Nobody here has run it
Docker Hardening
Use this skill when reviewing or improving Dockerfiles, Compose files, container runtime flags, or image build workflows.
Inputs
- Dockerfile, compose file, build logs, image metadata, deployment environment, and application runtime requirements
Steps
- Review base image choice, version pinning, architecture, and maintenance status.
- Check build reproducibility: pinned dependencies, deterministic package install, cache hygiene, and lockfile use.
- Reduce image size where it also improves reliability or security: multi-stage builds, minimal runtime dependencies, and cleaned package caches.
- Review runtime security: non-root user, file permissions, capabilities, read-only filesystem, secrets handling, exposed ports, and health checks.
- Check supply-chain risk: curl-pipe-shell, unsigned downloads, mutable tags, and unverified artifacts.
- Validate operational readiness: signals, graceful shutdown, logging, startup command, environment variables, and resource expectations.
Output
Return:
- Container risk summary
- Recommended Dockerfile/config changes
- Security hardening checklist
- Reproducibility and size notes
- Validation commands such as build, run, scan, or smoke test
Guidelines
- Do not optimize image size at the expense of clarity or correctness.
- Prefer pinned, maintained base images.
- Keep production runtime separate from build tooling when practical.