File size: 1,182 Bytes
060f4e5
 
8f4f597
 
 
27ab91b
 
324cd34
ff4b7db
27ab91b
 
fb33c85
27ab91b
 
c914907
8f4f597
 
 
 
ff4b7db
8f4f597
 
 
 
 
 
 
7ac0afa
8f4f597
 
6f8fad3
fb33c85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#FROM ghcr.io/snekkenull/open-webui:latest
FROM ghcr.io/snekkenull/open-webui:v0.5.18-ollama

WORKDIR /app/backend

RUN mkdir -p /app/backend/open_webui/static
RUN mkdir -p /app/backend/data
RUN mkdir -p /data/cache

# Install necessary dependencies
RUN apt-get update && apt-get install -y apache2-utils sqlite3
RUN pip install -U pip wheel cmake hf_xet uvicorn

# Update the admin password in webui.db by setting secret ORIN_PASSWORD, admin account is [email protected]
COPY webui3.db /webui.db
RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
    htpasswd -bnBC 10 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash && \
    sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';" && \
    rm /tmp/password_hash

# Copy the updated webui.db to the desired location
RUN cp /webui.db /app/backend/data/webui.db
# Modify and Copy config.json to set the default lang and preset prompts.
# COPY config.json /app/backend/data/config.json

RUN chmod -R 777 /app/backend/open_webui/static
RUN chmod -R 777 /app/backend/data
RUN chmod -R 777 /data

EXPOSE 7860

CMD ["bash", "start.sh"]