Docker container guidelines for production deployments. Apply when editing `Dockerfile`, `docker-compose.yml`, or `.dockerignore` files. Use for multi-stage builds, security hardening, image slimming. Keywords: Dockerfile, multi-stage, alpine/distroless, layer caching, non-root, secrets, health checks, BuildKit.
Scanned 9/12/2026
Install to Claude Code
npx -y skills add aibot88/sec_skill_store --skill docker-guide --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Docker Guide?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aibot88-docker-guide)More formats (shields.io, HTML) on the badges page.
---
name: docker-guide
description: "Docker container guidelines for production deployments. Apply when editing `Dockerfile`, `docker-compose.yml`, or `.dockerignore` files. Use for multi-stage builds, security hardening, image slimming. Keywords: Dockerfile, multi-stage, alpine/distroless, layer caching, non-root, secrets, health checks, BuildKit."
---
# Docker Coding Guidelines
## Essentials
- **Build optimization** - Multi-stage builds, small base images (alpine/distroless), see [reference/multi-stage-builds.md](reference/multi-stage-builds.md)
- **Layer caching** - Order layers for caching, copy lockfiles before source, see [reference/layer-caching.md](reference/layer-caching.md)
- **Security** - Run as non-root, least privilege, no secrets in images, see [reference/security.md](reference/security.md)
- **Configuration** - Externalize config via env/volumes, pin versions, see [reference/production-config.md](reference/production-config.md)
- **Quality** - Use BuildKit and hadolint, add health endpoints, see [reference/production-config.md](reference/production-config.md)
## Progressive disclosure
- Read [reference/multi-stage-builds.md](reference/multi-stage-builds.md) - When creating production images or optimizing build process
- Read [reference/layer-caching.md](reference/layer-caching.md) - When builds are slow or cache invalidates frequently
- Read [reference/security.md](reference/security.md) - When hardening images or handling secrets
- Read [reference/production-config.md](reference/production-config.md) - When adding health checks or configuring for orchestration
- Read [reference/docker-compose.md](reference/docker-compose.md) - When defining multi-service local development environments
Is this your skill, or is something wrong with this listing? . Author removals are honored within 72 hours.
No comments yet. Be the first to comment!