Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
# Use an official Node.js image
|
| 2 |
FROM node:20-slim
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
USER
|
| 7 |
-
ENV HOME=/home/
|
| 8 |
WORKDIR $HOME/app
|
| 9 |
|
| 10 |
-
# Copy configuration files
|
| 11 |
-
COPY --chown=
|
| 12 |
|
| 13 |
# Install dependencies
|
| 14 |
RUN npm install
|
| 15 |
|
| 16 |
# Copy the rest of the application files
|
| 17 |
-
COPY --chown=
|
| 18 |
|
| 19 |
# Expose the default port for the API gateway
|
| 20 |
EXPOSE 7860
|
|
|
|
| 1 |
# Use an official Node.js image
|
| 2 |
FROM node:20-slim
|
| 3 |
|
| 4 |
+
# The image already has a 'node' user with UID 1000.
|
| 5 |
+
# Hugging Face requires UID 1000, so we switch to this existing user.
|
| 6 |
+
USER node
|
| 7 |
+
ENV HOME=/home/node
|
| 8 |
WORKDIR $HOME/app
|
| 9 |
|
| 10 |
+
# Copy configuration files with the correct ownership
|
| 11 |
+
COPY --chown=node package*.json ./
|
| 12 |
|
| 13 |
# Install dependencies
|
| 14 |
RUN npm install
|
| 15 |
|
| 16 |
# Copy the rest of the application files
|
| 17 |
+
COPY --chown=node . .
|
| 18 |
|
| 19 |
# Expose the default port for the API gateway
|
| 20 |
EXPOSE 7860
|