hstz commited on
Commit
d102e3b
1 Parent(s): ecedd69

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -21
Dockerfile CHANGED
@@ -1,32 +1,28 @@
1
- # Deployed Open-webui with persistent admin role with password secret.
2
- # Users registration is allowed by default, but user group data will be lost with each building.
3
 
4
- FROM ghcr.io/snekkenull/open-webui:main
5
 
6
- WORKDIR /app/backend
7
-
8
- RUN mkdir -p /app/backend/static
9
- RUN mkdir -p /app/backend/data
10
- RUN mkdir -p /app/cache
11
 
12
  # Install necessary dependencies
13
- RUN apt-get update && apt-get install -y apache2-utils sqlite3
14
 
15
- # Update the admin password in webui.db by setting secret ORIN_PASSWORD, admin account is [email protected]
16
- COPY webui.db /webui.db
17
- RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
18
- htpasswd -bnBC 10 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash && \
19
- sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';" && \
20
- rm /tmp/password_hash
21
 
22
  # Copy the updated webui.db to the desired location
23
- RUN cp /webui.db /app/backend/data/webui.db
24
- # Modify and Copy config.json to set the default lang and preset prompts.
25
- # COPY config.json /app/backend/data/config.json
26
 
27
- RUN chmod -R 777 /app/backend/static
28
- RUN chmod -R 777 /app/backend/data
29
- RUN chmod -R 777 /app/cache
30
 
31
  EXPOSE 7860
32
 
 
1
+ FROM ghcr.io/open-webui/open-webui:main
 
2
 
3
+ #WORKDIR /app/backend
4
 
5
+ #RUN mkdir -p /app/backend/static
6
+ #RUN mkdir -p /app/backend/data
7
+ #RUN mkdir -p /app/cache
 
 
8
 
9
  # Install necessary dependencies
10
+ #RUN apt-get update && apt-get install -y apache2-utils sqlite3
11
 
12
+ # Update the password in webui.db
13
+ # COPY webui.db /webui.db
14
+ # RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
15
+ # htpasswd -bnBC 10 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash && \
16
+ # sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';" && \
17
+ # rm /tmp/password_hash
18
 
19
  # Copy the updated webui.db to the desired location
20
+ # RUN cp /webui.db /app/backend/data/webui.db
21
+ #COPY webui.db /app/backend/data/webui.db
 
22
 
23
+ #RUN chmod -R 777 /app/backend/static
24
+ #RUN chmod -R 777 /app/backend/data
25
+ #RUN chmod -R 777 /app/cache
26
 
27
  EXPOSE 7860
28