FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . # Initialize DB during build or ensure it's created at runtime. # For simplicity, we'll let the app create it if missing, but we need write permissions. # In a real app, we'd use a volume. Here it's inside the container. EXPOSE 5000 CMD ["python", "app.py"]