Spaces:
Build error
Build error
Update Dockerfile
Browse files- 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
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|