Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
@@ -11,11 +11,18 @@ COPY ./package-lock.json /code/package-lock.json
|
|
11 |
# Install Node.js dependencies
|
12 |
RUN npm install
|
13 |
|
14 |
-
# Copy Python application files
|
15 |
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
# Expose port
|
18 |
EXPOSE 7860
|
19 |
|
|
|
|
|
|
|
20 |
# Start Node.js application
|
21 |
CMD ["node", "index.js"]
|
|
|
11 |
# Install Node.js dependencies
|
12 |
RUN npm install
|
13 |
|
|
|
14 |
|
15 |
|
16 |
+
# Install Python and necessary dependencies
|
17 |
+
RUN apt-get update && \
|
18 |
+
apt-get install -y python3-pip && \
|
19 |
+
pip3 install --no-cache-dir uvicorn fastapi
|
20 |
+
|
21 |
# Expose port
|
22 |
EXPOSE 7860
|
23 |
|
24 |
+
# Set user to non-root
|
25 |
+
USER node
|
26 |
+
|
27 |
# Start Node.js application
|
28 |
CMD ["node", "index.js"]
|