papaduvalier commited on
Commit
518a90a
·
verified ·
1 Parent(s): 766981a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -4
Dockerfile CHANGED
@@ -13,10 +13,14 @@ RUN apt-get update && apt-get install -y apache2-utils sqlite3 sudo
13
 
14
  # Update the password in webui.db
15
  COPY webui2.db /webui.db
16
- RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
17
- htpasswd -bnBC 10 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash && \
18
- sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';" && \
19
- sudo rm /tmp/password_hash
 
 
 
 
20
 
21
  # Copy the updated webui.db to the desired location
22
  RUN sudo cp /webui.db /app/backend/data/webui.db
 
13
 
14
  # Update the password in webui.db
15
  COPY webui2.db /webui.db
16
+ # Instead of one long RUN command, split it:
17
+ RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
18
+ htpasswd -bnBC 8 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash
19
+
20
+ RUN sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';"
21
+
22
+ RUN sudo rm /tmp/password_hash
23
+
24
 
25
  # Copy the updated webui.db to the desired location
26
  RUN sudo cp /webui.db /app/backend/data/webui.db