Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Docker Best Practices?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-docker-best-practices)
---
description: Small, secure, reproducible container images
profile: full
tags: docker, devops
---
# Docker Best Practices
- Pin base images by digest; prefer slim/distroless.
- Multi-stage builds; copy only build outputs into the final stage.
- Run as a non-root user; read-only filesystem where possible.
- Never bake secrets into layers; use build secrets or runtime env.
- `.dockerignore` excludes `.git`, `node_modules`, `.env`.
## Verify
`docker build` succeeds, `docker run --rm <image> id -u` is not 0, the image size is reported, and `docker history` shows no secrets in any layer.