docker-development
Fungsinya
Skill ini memandu agent menulis, mengoptimalkan, dan meninjau pengaturan container Docker. Skill ini untuk pengembang yang menginginkan container yang cepat dibangun, berukuran kecil, dan aman dijalankan.
Kapan dipakai
- โSaat build Docker Anda lambat atau image Anda terlalu besar.
- โSaat Anda ingin menyiapkan file docker-compose untuk sebuah proyek.
- โSaat Anda ingin memeriksa Dockerfile dari masalah keamanan sebelum rilis.
Link skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/docker-development/skills/docker-development/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โImage Docker saya terlalu besar dan build-nya lambat. Optimalkan Dockerfile untuk ukuran dan caching.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menganalisis layer, cache, dan ukuran Dockerfile, lalu menyarankan perubahan seperti multi-stage build. Agent juga memvalidasi file compose dan mengaudit masalah keamanan pada Dockerfile atau container yang berjalan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Docker Development
Smaller images. Faster builds. Secure containers. No guesswork.
Opinionated Docker workflow that turns bloated Dockerfiles into production-grade containers. Covers optimization, multi-stage builds, compose orchestration, and security hardening.
Not a Docker tutorial โ a set of concrete decisions about how to build containers that don't waste time, space, or attack surface.
Slash Commands
| Command | What it does |
|---|---|
/docker-development optimize |
Analyze and optimize a Dockerfile for size, speed, and layer caching |
/docker-development compose |
Generate or improve docker-compose.yml with best practices |
/docker-development security |
Audit a Dockerfile or running container for security issues |
When This Skill Activates
Recognize these patterns from the user:
- "Optimize this Dockerfile"
- "My Docker build is slow"
- "Create a docker-compose for this project"
- "Is this Dockerfile secure?"
- "Reduce my Docker image size"
- "Set up multi-stage builds"
- "Docker best practices for [language/framework]"
- Any request involving: Dockerfile, docker-compose, container, image size, build cache, Docker security
If the user has a Dockerfile or wants to containerize something โ this skill applies.
Workflow
/docker-development optimize โ Dockerfile Optimization
Analyze current state
- Read the Dockerfile
- Identify base image and its size
- Count layers (each RUN/COPY/ADD = 1 layer)
- Check for common anti-patterns
Apply optimization checklist
BASE IMAGE โโโ Use specific tags, never :latest in production โโโ Prefer slim/alpine variants (debian-slim > ubuntu > debian) โโโ Pin digest for reproducibility in CI: image@sha256:... โโโ Match base to runtime needs (don't use python:3.12 for a compiled binary) LAYER OPTIMIZATION โโโ Combine related RUN commands with && \ โโโ Order layers: least-changing first (deps before source code) โโโ Clean package manager cache in the same RUN layer โโโ Use .dockerignore to exclude unnecessary files โโโ Separate build deps from runtime deps BUILD CACHE โโโ COPY dependency files before source code (package.json, requirements.txt, go.mod) โโโ Install deps in a separate layer from code copy โโโ Use BuildKit cache mounts: --mount=type=cache,target=/root/.cache โโโ Avoid COPY . . before dependency installation MULTI-STAGE BUILDS โโโ Stage 1: build (full SDK, build tools, dev deps) โโโ Stage 2: runtime (minimal base, only production artifacts) โโโ COPY --from=builder only what's needed โโโ Final image should have NO build tools, NO source code, NO dev depsGenerate optimized Dockerfile
- Apply all relevant optimizations
- Add inline comments explaining each decision
- Report estimated size reduction
Validate
python3 scripts/dockerfile_analyzer.py Dockerfile
/docker-development compose โ Docker Compose Configuration
Identify services
- Application (web, API, worker)
- Database (postgres, mysql, redis, mongo)
- Cache (redis, memcached)
- Queue (rabbitmq, kafka)
- Reverse proxy (nginx, traefik, caddy)
Apply compose best practices
SERVICES โโโ Use depends_on with condition: service_healthy โโโ Add healthchecks for every service โโโ Set resource limits (mem_limit, cpus) โโโ Use named volumes for persistent data โโโ Pin image versions NETWORKING โโโ Create explicit networks (don't rely on default) โโโ Separate frontend and backend networks โโโ Only expose ports that need external access โโโ Use internal: true for backend-only networks ENVIRONMENT โโโ Use env_file for secrets, not inline environment โโโ Never commit .env files (add to .gitignore) โโโ Use variable substitution: ${VAR:-default} โโโ Document all required env vars DEVELOPMENT vs PRODUCTION โโโ Use compose profiles or override files โโโ Dev: bind mounts for hot reload, debug ports exposed โโโ Prod: named volumes, no debug ports, restart: unless-stopped โโโ docker-compose.override.yml for dev-only configGenerate compose file
- Output docker-compose.yml with healthchecks, networks, volumes
- Generate .env.example with all required variables documented
- Add dev/prod profile annotations
/docker-development security โ Container Security Audit
- **Dockerfile
Pertanyaan umum
Apa itu multi-stage build?
Yaitu Dockerfile yang memakai satu tahap untuk membangun aplikasi dan tahap yang lebih kecil untuk menjalankannya, sehingga image akhirnya lebih ringan.
Bisakah skill memeriksa container yang sedang berjalan?
Bisa. Perintah keamanan dapat mengaudit Dockerfile atau container yang berjalan.
Apakah skill membantu docker-compose?
Ya. Skill dapat membuat atau memperbaiki file docker-compose dengan praktik terbaik.
Detail
Deskripsi asli dari pembuat
Use for any Dockerfile or docker-compose file to write, optimize or review, before editing it. Checks layers, caching, size and security with dockerfile_analyzer.py and validates compose files with compose_validator.py.
Popularitas
- Bintang GitHub
- 29k
- Peringkat
- #9555
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
agent-launcher-orchestrator
29kMembantu agent Anda merencanakan, membangun, menguji, dan menjadwalkan agent Claude terkelola di akun Anda sendiri, langkah demi langkah.
grade-iterate
29kMembantu agent Anda menilai hasil kerja agent AI terkelola berdasarkan rubrik dan memperbaikinya dalam jumlah putaran tetap, agar tidak berputar tanpa henti.
interview
29kMembantu agent Anda mewawancarai Anda tentang ide agent AI dan mengubah jawaban Anda menjadi rencana pembangunan sederhana sebelum apa pun diluncurkan.
run-without-you
29kMembantu agent Anda disiapkan agar berjalan tanpa Anda sesuai jadwal atau saat sebuah peristiwa terjadi, dengan waktu cron diperiksa sebelum peluncuran.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.