docker-containerization
SKILL.md
Docker & Containerization
When to use this skill
- Creating
Dockerfileordocker-compose.yml. - Optimizing image size.
- Debugging container networking.
1. Dockerfile Best Practices
- Multi-Stage: Use multi-stage builds to keep production images small (e.g., build in
node:20, run innode:20-alpine). - Ordering: Place frequent changes (code copying) AFTER infrequent changes (npm install) to leverage layer caching.
- User: Don't run as root. User
USER nodeor create a non-root user.
2. Docker Compose
- Services: Define services clearly (
app,db,redis). - Volumes: Use named volumes for persistence (
postgres_data:/var/lib/postgresql/data). - Env: Use
.envfile for environment variables.
Weekly Installs
3
Repository
sraloff/gravitybootsGitHub Stars
2
First Seen
Feb 21, 2026
Security Audits
Installed on
opencode3
gemini-cli3
github-copilot3
codex3
kimi-cli3
amp3