FROM python:3.11-slim | |
WORKDIR /app | |
COPY sync_webuidb.sh /app/sync_webuidb.sh | |
RUN apt-get update && apt-get install -y build-essential git curl \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& pip install --no-cache-dir open-webui \ | |
&& chmod +x /app/sync_webuidb.sh \ | |
&& chmod -R 777 /app | |
ENV HOST=0.0.0.0 PORT=7860 DATA_DIR=/app/data | |
EXPOSE $PORT | |
USER root | |
CMD ["/bin/bash", "-c", "/app/sync_webuidb.sh & open-webui serve --host $HOST --port $PORT"] |