webui / Dockerfile
bardd's picture
Update Dockerfile
698a0e5 verified
raw
history blame contribute delete
648 Bytes
FROM ghcr.io/open-webui/open-webui:main
ENV ENV=production
ENV WEBUI_AUTH=false
ENV OPENAI_API_BASE_URL=https://api.deepinfra.com/v1/openai
ENV OPENAI_API_KEY=OPENAI_API_KEY
# Create a non-root user
RUN useradd -m -u 1000 webuser
# Set the working directory
WORKDIR /app
# Create necessary directories and set permissions
RUN mkdir -p /app/backend/data && \
chown -R webuser:webuser /app
# Switch to the non-root user
USER webuser
# Set environment variables
ENV HOME=/home/webuser \
PATH=/home/webuser/.local/bin:$PATH \
WEBUI_SECRET_KEY=/app/backend/data/.webui_secret_key
# Run the start script
CMD ["/app/backend/start.sh"]