Agentic-skills docker-containerization-best-practices
Comprehensive containerization framework with production-ready patterns for Django, FastAPI, and Celery applications. Use when deploying applications, managing environments, or implementing microservices architecture.
install
source · Clone the upstream repo
git clone https://github.com/GNSubrahmanyam/agentic-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/GNSubrahmanyam/agentic-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/docker" ~/.claude/skills/gnsubrahmanyam-agentic-skills-docker-containerization-best-practices && rm -rf "$T"
manifest:
skills/docker/SKILL.mdsource content
Docker Containerization Best Practices
Comprehensive containerization framework with 60+ rules across Dockerfile optimization, multi-service orchestration, production deployment, and development workflows. Designed for reliable, scalable container deployments from development to production.
When to Apply
Reference these guidelines when:
- Containerizing Django, FastAPI, or Celery applications
- Setting up multi-service architectures with Docker Compose
- Implementing production deployment pipelines
- Managing development environments consistently
- Scaling containerized applications
- Optimizing container performance and security
Rule Categories by Priority
| Priority | Category | Impact | Files Created | Prefix | | --- | --- | --- | --- | --- | --- | | 1 | Container Fundamentals | CRITICAL | 4 |
dockerfile- |
| 2 | Docker Build | CRITICAL | 4 | build- |
| 3 | Application Containers | CRITICAL | 5 | app- |
| 4 | Docker Compose | HIGH | 8 | compose- |
| 5 | Orchestration | HIGH | 3 | swarm- |
| 6 | Security | HIGH | 3 | security- |
| 7 | Production Deployment | HIGH | 2 | deploy- |
| 8 | Observability | MEDIUM | 3 | logging- |
| 9 | Development Workflow | MEDIUM | 2 | dev- |
| 10 | Infrastructure | MEDIUM | 3 | infra- |
| 11 | Advanced Features | LOW | 3 | advanced- |
Quick Reference
1. Container Fundamentals (CRITICAL)
: Secure base images and vulnerability scanningdockerfile-security
: Multi-stage builds and layer cachingdockerfile-optimization
: Proper user management and signal handlingdockerfile-best-practices
: Tagging strategies and registry usageimage-management
2. Docker Build (CRITICAL)
: Advanced build features with Buildxbuild-buildx
: Cross-platform image buildingbuild-multiplatform
: Build caching for faster buildsbuild-cache
: Secrets, SSH, and attestations in buildsbuild-security
3. Application Containers (CRITICAL)
: Django containerization with static files and migrationsapp-django
: FastAPI async containerization with Uvicornapp-fastapi
: Celery containerization with broker integrationapp-celery
: Database containerization with persistenceapp-database
: Redis containerization for caching and data structuresapp-redis
4. Docker Compose (HIGH)
: Development environment orchestrationcompose-development
: Production-ready service compositioncompose-production
: Service communication and isolationcompose-networking
: Data persistence and sharingcompose-volumes
: Configuration and secrets managementcompose-configs-secrets
: Multiple compose files and includescompose-multiple-files
: Environment variables and interpolationcompose-environment
: Advanced CLI commands and project managementcompose-cli-advanced
5. Orchestration (HIGH)
: Docker Swarm cluster managementswarm-setup
: Swarm service deployment and scalingswarm-services
: Swarm overlay networking and securityswarm-networking
6. Security (HIGH)
: Docker Scout vulnerability scanningsecurity-scanning
: Container runtime security hardeningsecurity-hardening
: Security compliance and best practicessecurity-compliance
7. Production Deployment (HIGH)
: Container registry management and securitydeploy-registry
: Horizontal scaling and load balancingdeploy-scaling
8. Observability (MEDIUM)
: Docker logging drivers and configurationlogging-drivers
: Log aggregation and monitoringlogging-aggregation
: Debugging and troubleshooting containerslogging-troubleshooting
9. Development Workflow (MEDIUM)
: Development with live code reloadingdev-hot-reload
: Testing in containerized environmentsdev-testing
: Container debugging and troubleshootingdev-debugging
: Testing in containerized environmentsdev-testing
10. Infrastructure (MEDIUM)
: Container networking patternsinfra-networking
: Container runtime securityinfra-security
: Persistent storage and backupsinfra-storage
11. Advanced Features (LOW)
: Docker Desktop features and developmentadvanced-desktop
: Docker context managementadvanced-context
: Docker API and programmatic accessadvanced-api
Quick Start
- 📖 Overview:
skills/docker-skill/SKILL.md - 📚 Complete Reference:
skills/docker-skill/AGENTS.md - 🔍 Specific Rules:
skills/docker-skill/rules/[category]-[rule-name].md
| Total | 11 Categories | | 42 Files | 170+ Rules | |