Loading...
Loading...
Review and optimize Dockerfiles to reduce layer count, minimize image size, and improve build times. Trigger when the user asks to review a Dockerfile, make a Docker image smaller, speed up a Docker build, or asks for Docker best practices.
npx skill4agent add sunny0826/open-source-skills dockerfile-optimizerDockerfileRUNubuntunode:18alpineslimroot# Dockerfile Optimization Report
## 🛠️ Optimized Dockerfile
```dockerfile
[Your optimized Dockerfile goes here]alpineslimRUNpackage.jsongo.modrequirements.txtRUN&&USER.dockerignorenode_modules.git
### Chinese Template:
```markdown
# Dockerfile 优化报告
## 🛠️ 优化后的 Dockerfile
```dockerfile
[你优化后的 Dockerfile 放在这里]alpineslimRUNpackage.jsongo.modrequirements.txt&&RUNUSER.dockerignorenode_modules.git
## Important Rules:
- **Do not break the app:** Ensure your optimizations (like using Alpine) won't break common dependencies unless you warn the user (e.g., Alpine uses `musl` instead of `glibc`, which can affect some Python/C++ binaries).
- **Consolidate correctly:** Always chain `apt-get update` and `apt-get install` in the same `RUN` command, followed immediately by `rm -rf /var/lib/apt/lists/*`.