File size: 512 Bytes
d8c858d
 
5d2bd4d
 
d8c858d
 
5d2bd4d
d8c858d
5d2bd4d
 
 
5c9430c
5d2bd4d
 
 
 
 
 
 
d8c858d
5d2bd4d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ghcr.io/open-webui/open-webui:main

# 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"]