# 1. Base Image FROM ghcr.io/open-webui/open-webui:main # 2. Environment Variables ENV PORT=7860 ENV OLLAMA_BASE_URL=http://localhost:11434 ENV OLLAMA_MODELS=/app/backend/data/ollama # 3. Switch to root USER root # 4. FIX: Install 'zstd' which is required for Ollama installation RUN apt-get update && apt-get install -y zstd # 5. Install Ollama RUN curl -fsSL https://ollama.com/install.sh | sh # 6. Start Ollama (background) -> Wait -> Start WebUI CMD bash -c "ollama serve & sleep 10 && /app/backend/start.sh"