0
Optimize dockerfile
Daha küçük görüntüler, daha hızlı derlemeler ve daha iyi güvenlik için mevcut bir Docker dosyasını optimize edin.
yazan kuscubasiece·8 Eylül 2026
Kaynak: rohitg00/awesome-claude-code-toolkit · Apache-2.0
Daha küçük görüntüler, daha hızlı derlemeler ve daha iyi güvenlik için mevcut bir Docker dosyasını optimize edin.
Kaynak: rohitg00/awesome-claude-code-toolkit · Apache-2.0
mkdir -p .claude/commands && curl -sL https://www.antrophiclove.com/api/kaynak/optimize-dockerfile/raw -o .claude/commands/optimize-dockerfile.mdHedef dosya: .claude/commands/optimize-dockerfile.md
Optimize an existing Dockerfile for smaller images, faster builds, and better security.
--mount=type=cache for package manager caches.USER <non-root>.HEALTHCHECK instruction.Dockerfile Optimization: <path>
Before: <size>MB, <layers> layers
After: <size>MB, <layers> layers
Reduction: <percent>%
Changes:
1. Switched base from node:20 to node:20-alpine (-600MB)
2. Combined 5 RUN commands into 2 (-3 layers)
3. Added multi-stage build, excluded devDependencies (-200MB)
4. Added non-root USER instruction (security)
Verification: container starts and passes health check