DockerCraft: Dockerfile Analyzer & Compose Studio Pro 🐳

Instant production Dockerfile generator, multi-stage build analyzer, layer optimization linter, and docker-compose.yml studio directly in VS Code.
✨ Features
- 🚀 1-Click Production Dockerfile Templates: Generate multi-stage, hardened Dockerfiles optimized for:
- Node.js / TypeScript: Multi-stage Alpine,
npm ci, non-root user, dumb-init, health checks.
- Next.js: Standalone output with ~80MB final image size.
- Python (FastAPI / Flask / Django): Slim base with virtualenv caching and unprivileged app user.
- Go: Minimal static binary on scratch (~15MB zero-vulnerability image).
- Nginx SPA: Multi-stage React/Vue/Vite static build with security headers.
- 🛡️ Real-Time Dockerfile Linter & Security Audit:
- Flags dangerous
:latest image tags.
- Detects missing non-root
USER definitions.
- Identifies layer cache invalidation bugs (e.g.
COPY . . before npm install).
- Catches missing
apt-get cache cleanups (rm -rf /var/lib/apt/lists/*).
- Warns when
.dockerignore is missing in the workspace.
- 📄 Leak-Proof
.dockerignore Generator: Automatically guards against accidentally baking .env, .git, node_modules, or private keys into your container images.
- 🐙 Docker Compose Studio: Generate clean, production-ready
docker-compose.yml files with health checks and restart policies.
🛠️ Usage
Generate Dockerfile
Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) and run:
DockerCraft: Generate Production Dockerfile...
Select your stack (Node.js, Next.js, Python, Go, Nginx) and DockerCraft will write the Dockerfile and optimal .dockerignore file.
Analyze Dockerfile
Open any Dockerfile in the editor. DockerCraft automatically inspects layer caching order and security settings, highlighting suggestions directly in your editor.
⚙️ Configuration
| Setting |
Type |
Default |
Description |
dockercraft.enableDiagnostics |
boolean |
true |
Show inline warning squigglies for unoptimized Dockerfile instructions. |
dockercraft.defaultPort |
number |
3000 |
Default exposed port when generating new Dockerfiles. |
If you find DockerCraft helpful, please consider sponsoring ongoing development:
👉 Sponsor Pirapaakaran on GitHub
Connect on LinkedIn: Pirapaakaran Pirathapan
📄 License
MIT © Pirapaakaran Pirathapan