| name | vibe-deployer |
| description | DevOps agent with complete Docker deployment skill - Build, Push, Deploy to any platform. Supports all major registries, cloud platforms, and CI/CD pipelines. |
| disable-model-invocation | true |
| argument-hint | [action] - Options: build, push, deploy, ci-cd, full |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash(docker:*), Bash(docker-compose:*), Bash(curl:*), Bash(sleep:*) |
Docker Deploy Skill
Complete Docker deployment solution cho bất kỳ project nào. Hỗ trợ tất cả registries, platforms và CI/CD pipelines phổ biến.
Overview
┌──────────────────────────────────────────────────────────────────────────────────┐
│ DOCKER DEPLOY WORKFLOW │
├──────────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌────────┐ ┌────────────┐ ┌────────┐ ┌────────┐ ┌─────────┐ │
│ │ BUILD │-->│ LOCAL TEST │-->│ PUSH │-->│ DEPLOY │-->│ RUNNING │ │
│ │ Image │ │ & Verify │ │Registry│ │Platform│ │ App │ │
│ └────────┘ └────────────┘ └────────┘ └────────┘ └─────────┘ │
│ │ │ │ │ │
│ v v v v │
│ templates/ (local docker) registries/ platforms/ │
│ │
│ + CI/CD Automation ────────────────────────────────> ci-cd/ │
│ │
└──────────────────────────────────────────────────────────────────────────────────┘
Supported Technologies
Project Types (Dockerfile Templates)
| Category | Technologies |
|---|
| JavaScript/TypeScript | Next.js, Node.js, Express, NestJS, Fastify |
| Python | FastAPI, Flask, Django, Streamlit |
| Go | Gin, Echo, Fiber, Chi, standard library |
| PHP | Laravel, Symfony, WordPress |
| Java | Spring Boot, Quarkus, Micronaut |
| .NET | ASP.NET Core, Blazor |
| Rust | Actix-web, Axum, Rocket |
| Static | HTML/CSS/JS, React, Vue, Angular |
Container Registries
Deployment Platforms
CI/CD Pipelines
Workflow
Step 1: Build Docker Image
Detect project type (auto hoặc specify):
package.json + next.config.* → Next.js
package.json → Node.js
requirements.txt / pyproject.toml → Python
go.mod → Go
composer.json → PHP
pom.xml / build.gradle → Java
*.csproj → .NET
Cargo.toml → Rust
index.html (no backend) → Static
Generate files:
Dockerfile - Multi-stage build, optimized
docker-compose.yml - Development config
docker-compose.prod.yml - Production config
.dockerignore - Exclude unnecessary files
Templates: See templates/ folder
Step 2: Local Build & Test
QUAN TRỌNG: Sau khi tạo xong các file cấu hình Docker, PHẢI build và test trên local để đảm bảo mọi thứ hoạt động trước khi push/deploy.
2.1 - Build Docker Image
docker build -t {app-name}:local-test .
docker images {app-name}:local-test
Kiểm tra:
Nếu build FAIL: Đọc error log, sửa Dockerfile, build lại cho đến khi thành công.
2.2 - Test Docker Container
docker run -d -p {host-port}:{container-port} --name {app-name}-test {app-name}:local-test
sleep 5
docker ps --filter "name={app-name}-test"
docker logs {app-name}-test
curl -f http://localhost:{host-port}/health || curl -f http://localhost:{host-port}/api/health || curl -f http://localhost:{host-port}/
docker stats {app-name}-test --no-stream
Kiểm tra:
Nếu container FAIL:
- Kiểm tra logs:
docker logs {app-name}-test
- Debug bằng interactive shell:
docker run -it --entrypoint sh {app-name}:local-test
- Sửa Dockerfile hoặc code, quay lại bước 2.1
docker stop {app-name}-test && docker rm {app-name}-test
2.3 - Test Docker Compose
docker-compose up -d
sleep 10
docker-compose ps
docker-compose logs --tail=50
curl -f http://localhost:{host-port}/health || curl -f http://localhost:{host-port}/
docker-compose exec app sh -c "echo 'Container is accessible'"
Kiểm tra:
docker-compose down -v
2.4 - Test Docker Compose Production (nếu có)
docker-compose -f docker-compose.prod.yml up -d
sleep 10
docker-compose -f docker-compose.prod.yml ps
docker-compose -f docker-compose.prod.yml logs --tail=50
curl -f http://localhost:{host-port}/
docker-compose -f docker-compose.prod.yml down -v
2.5 - Báo cáo kết quả
Sau khi test xong, báo cáo cho user:
📋 LOCAL BUILD & TEST REPORT
═══════════════════════════════════════
✅/❌ Docker Build: [PASS/FAIL] - Image size: XXX MB
✅/❌ Container Run: [PASS/FAIL] - Status: running/exited
✅/❌ Health Check: [PASS/FAIL] - HTTP {status_code}
✅/❌ Docker Compose: [PASS/FAIL] - {N} services running
✅/❌ Compose Prod: [PASS/FAIL] - {N} services running
═══════════════════════════════════════
Nếu tất cả PASS: Tiếp tục sang Step 3 (Choose Registry).
Nếu có FAIL: Sửa lỗi và test lại cho đến khi tất cả PASS. KHÔNG được tiếp tục nếu local test chưa pass.
Step 3: Choose Container Registry
Hỏi user muốn push image lên registry nào:
| Registry | Best For | Cost |
|---|
| Docker Hub | Public images, beginners | 1 free private repo |
| GitHub GHCR | GitHub projects | Free unlimited private |
| GitLab Registry | GitLab projects | Free unlimited |
| AWS ECR | AWS deployments | 500MB free tier |
| Google GAR | GCP deployments | Free tier available |
| Azure ACR | Azure deployments | Paid |
Guides: See registries/ folder
Step 4: Choose Deployment Platform
Hỏi user muốn deploy lên platform nào:
| If user wants... | Recommend |
|---|
| Free, easy, learning | Railway, Render |
| Full control, cheap | VPS + Docker Compose |
| Self-hosted PaaS | Coolify |
| Enterprise/Scale | AWS ECS, Google Cloud Run |
| Edge deployment | Fly.io |
Guides: See platforms/ folder
Step 5: Setup CI/CD (Optional)
Hỏi user có muốn setup CI/CD không:
| If using... | Recommend |
|---|
| GitHub | GitHub Actions |
| GitLab | GitLab CI |
| Bitbucket | Bitbucket Pipelines |
| Self-hosted | Jenkins |
Templates: See ci-cd/ folder
Quick Reference
Common Commands
docker build -t myapp:latest .
docker build -t myapp:v1.0.0 --no-cache .
docker tag myapp:latest registry/username/myapp:latest
docker push registry/username/myapp:latest
docker-compose up -d
docker-compose -f docker-compose.prod.yml up -d
Environment Variables
ARG NODE_ENV=production
environment:
- DATABASE_URL=${DATABASE_URL}
- API_KEY=${API_KEY}
Important Rules
MUST DO:
MUST NOT:
Recommended Combinations
For Students/Learning
Build → GitHub GHCR → Railway/Render → GitHub Actions
(Free, easy to setup, good documentation)
For Startups
Build → AWS ECR → AWS ECS/Fargate → GitHub Actions
(Scalable, professional, pay-as-you-go)
For Self-hosters
Build → Docker Hub → VPS + Coolify → GitLab CI
(Full control, one-time cost VPS)
For Enterprise
Build → Private Registry → Kubernetes → Jenkins/ArgoCD
(Maximum control and scale)
File Structure
.claude/skills/docker-deploy/
├── SKILL.md # This file
├── README.md # User guide
├── checklist.md # Security checklist
│
├── templates/ # Dockerfile templates
│ ├── nextjs.Dockerfile
│ ├── node.Dockerfile
│ ├── python.Dockerfile
│ ├── go.Dockerfile
│ ├── php.Dockerfile
│ ├── java.Dockerfile
│ ├── dotnet.Dockerfile
│ ├── rust.Dockerfile
│ ├── static.Dockerfile
│ ├── docker-compose.yml
│ ├── docker-compose.prod.yml
│ ├── dockerignore.txt
│ └── entrypoint.sh
│
├── registries/ # Container registry guides
│ ├── docker-hub.md
│ ├── github-ghcr.md
│ ├── gitlab-registry.md
│ ├── aws-ecr.md
│ ├── google-gar.md
│ └── azure-acr.md
│
├── platforms/ # Deployment platform guides
│ ├── vps-manual.md
│ ├── vps-docker-compose.md
│ ├── railway.md
│ ├── render.md
│ ├── fly-io.md
│ ├── digitalocean-app.md
│ ├── aws-ecs.md
│ ├── aws-lightsail.md
│ ├── google-cloud-run.md
│ ├── azure-container-apps.md
│ └── coolify.md
│
└── ci-cd/ # CI/CD pipeline templates
├── github-actions.md
├── gitlab-ci.md
├── bitbucket-pipelines.md
└── jenkins.md
Troubleshooting
See checklist.md for common issues and solutions.
Version History
- v2.1.0 - Added Step 2: Local Build & Test - build và verify Docker image/container/compose trên local trước khi push/deploy
- v2.0.0 - Added registries, platforms, CI/CD guides
- v1.0.0 - Initial release with Dockerfile templates