How markbenjaminkatamba/dockerfile-generator works
Dockerfile Generator is a web app for creating language-specific Dockerfiles with optional user specifications, then requesting an explanation. The user enters inputs in the React UI; it calls FastAPI, which builds prompts and uses Ollama’s llama3.2:3b model before returning results for display or copying. The README documents generation, explanation, clipboard copying, loading and error feedback. Backend internals are based on the sampled Python excerpt; the API-to-frontend link is documented and visible in the frontend request code.
Main entry points: generate_dockerfile.py FastAPI endpoints · App.tsx Generator UI
Components 10
User interface
- Generator UI
frontend/src/App.tsx
Generation API
- FastAPI endpoints
local-llms-ollama/generate_dockerfile.py - Request models
local-llms-ollama/generate_dockerfile.py - Prompt builder
local-llms-ollama/generate_dockerfile.py - Language guidance
local-llms-ollama/generate_dockerfile.py - Dockerfile generation
local-llms-ollama/generate_dockerfile.py - Explanation generation
local-llms-ollama/generate_dockerfile.py
LLM inference
- Ollama model
Other components
- User
- Browser clipboard
Connections 11
- User → Generator UI: enters inputs
frontend/src/App.tsx - Generator UI → FastAPI endpoints: POSTs requests
frontend/src/App.tsx - FastAPI endpoints → Request models: validates with
local-llms-ollama/generate_dockerfile.py - FastAPI endpoints → Dockerfile generation: invokes
local-llms-ollama/generate_dockerfile.py - FastAPI endpoints → Explanation generation: invokes
local-llms-ollama/generate_dockerfile.py - Dockerfile generation → Prompt builder: builds prompt
local-llms-ollama/generate_dockerfile.py - Prompt builder → Language guidance: uses guidance
local-llms-ollama/generate_dockerfile.py - Dockerfile generation → Ollama model: requests generation
local-llms-ollama/generate_dockerfile.py - Explanation generation → Ollama model: requests explanation
local-llms-ollama/generate_dockerfile.py - FastAPI endpoints → Generator UI: returns results
frontend/src/App.tsx - Generator UI → Browser clipboard: copies Dockerfile
frontend/src/App.tsx