Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +18 -16
Dockerfile
CHANGED
@@ -53,8 +53,8 @@ RUN apk add --no-cache --virtual .build-deps \
|
|
53 |
apk add --no-cache \
|
54 |
bash \
|
55 |
git \
|
56 |
-
shadow \
|
57 |
libc6-compat \
|
|
|
58 |
py3-pip \
|
59 |
python3 && \
|
60 |
ln -sf python3 /usr/bin/python && \
|
@@ -79,29 +79,31 @@ RUN apk add --no-cache --virtual .build-deps \
|
|
79 |
apk del .build-deps && \
|
80 |
rm -rf /var/cache/apk/* /root/.cache /tmp/* && \
|
81 |
echo "Cleanup finished."
|
82 |
-
USER root
|
83 |
-
# RUN adduser -S -D -u 0 admin
|
84 |
|
85 |
-
# # (Optional) Add the admin user to the root group for completeness
|
86 |
-
# RUN addgroup admin root
|
87 |
-
RUN useradd -m -s /bin/bash admin
|
88 |
-
RUN passwd -d admin
|
89 |
-
# RUN admin ALL=ALL NOPASSWD: ALL
|
90 |
-
RUN usermod -aG root admin
|
91 |
-
USER admin
|
92 |
-
# # Switch to the admin user (now root-equivalent)
|
93 |
# USER admin
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
WORKDIR /app
|
96 |
RUN git clone https://github.com/AIGENHACKER/mcp-hfspace && cd mcp-hfspace && npm install && npm run build && npm link
|
97 |
RUN git clone https://github.com/exa-labs/exa-mcp-server && cd exa-mcp-server && npm install --save axios dotenv && npm run build && npm link
|
98 |
# Switch back to the non-root user defined in the base image (assuming 'node')
|
99 |
# Check the base image documentation if unsure about the default user
|
100 |
|
101 |
-
USER node
|
102 |
-
# Set the working directory (good practice)
|
103 |
-
RUN ngrok config add-authtoken $NGROK_AUTHTOKEN
|
104 |
-
|
105 |
|
106 |
# Expose the port the app runs on
|
107 |
EXPOSE 7860
|
|
|
53 |
apk add --no-cache \
|
54 |
bash \
|
55 |
git \
|
|
|
56 |
libc6-compat \
|
57 |
+
doas \
|
58 |
py3-pip \
|
59 |
python3 && \
|
60 |
ln -sf python3 /usr/bin/python && \
|
|
|
79 |
apk del .build-deps && \
|
80 |
rm -rf /var/cache/apk/* /root/.cache /tmp/* && \
|
81 |
echo "Cleanup finished."
|
82 |
+
# USER root
|
83 |
+
# # RUN adduser -S -D -u 0 admin
|
84 |
|
85 |
+
# # # (Optional) Add the admin user to the root group for completeness
|
86 |
+
# # RUN addgroup admin root
|
87 |
+
# RUN useradd -m -s /bin/bash admin
|
88 |
+
# RUN passwd -d admin
|
89 |
+
# # RUN admin ALL=ALL NOPASSWD: ALL
|
90 |
+
# RUN usermod -aG root admin
|
|
|
|
|
91 |
# USER admin
|
92 |
+
# # # Switch to the admin user (now root-equivalent)
|
93 |
+
# # USER admin
|
94 |
+
# RUN su - admin
|
95 |
+
|
96 |
+
USER node
|
97 |
+
RUN doas apk update
|
98 |
+
# Set the working directory (good practice)
|
99 |
+
RUN ngrok config add-authtoken $NGROK_AUTHTOKEN
|
100 |
+
|
101 |
WORKDIR /app
|
102 |
RUN git clone https://github.com/AIGENHACKER/mcp-hfspace && cd mcp-hfspace && npm install && npm run build && npm link
|
103 |
RUN git clone https://github.com/exa-labs/exa-mcp-server && cd exa-mcp-server && npm install --save axios dotenv && npm run build && npm link
|
104 |
# Switch back to the non-root user defined in the base image (assuming 'node')
|
105 |
# Check the base image documentation if unsure about the default user
|
106 |
|
|
|
|
|
|
|
|
|
107 |
|
108 |
# Expose the port the app runs on
|
109 |
EXPOSE 7860
|