Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
@@ -28,9 +28,16 @@ RUN mkdir -p /app/uploads/temp \
|
|
28 |
COPY librechat.yaml /app/librechat.yaml
|
29 |
COPY tests.py /app/tests.py
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
# --- Build Stage ---
|
32 |
# Temporarily switch to root for package installation
|
33 |
-
USER root
|
34 |
RUN sed -i 's/#\(.*\/community\)/\1/' /etc/apk/repositories
|
35 |
# Install Node.js dependencies first (leverages layer cache if package.json doesn't change often)
|
36 |
# Assuming package.json is in /app/api in the base image or copied before
|
|
|
28 |
COPY librechat.yaml /app/librechat.yaml
|
29 |
COPY tests.py /app/tests.py
|
30 |
|
31 |
+
RUN adduser -S -D -u 0 admin
|
32 |
+
|
33 |
+
# (Optional) Add the admin user to the root group for completeness
|
34 |
+
RUN addgroup admin root
|
35 |
+
|
36 |
+
# Switch to the admin user (now root-equivalent)
|
37 |
+
USER admin
|
38 |
# --- Build Stage ---
|
39 |
# Temporarily switch to root for package installation
|
40 |
+
# USER root
|
41 |
RUN sed -i 's/#\(.*\/community\)/\1/' /etc/apk/repositories
|
42 |
# Install Node.js dependencies first (leverages layer cache if package.json doesn't change often)
|
43 |
# Assuming package.json is in /app/api in the base image or copied before
|