Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -13,16 +13,16 @@ LABEL maintainer="[email protected]" \
|
|
| 13 |
usage="https://huggingface.co/spaces/DeFactOfficial/MMAPI"
|
| 14 |
|
| 15 |
# Set up a new user named "user" with user ID 1000
|
| 16 |
-
|
| 17 |
|
| 18 |
# Switch to the "user" user
|
| 19 |
-
USER
|
| 20 |
|
| 21 |
|
| 22 |
# Set home to the user's home directory
|
| 23 |
-
ENV HOME=/home/
|
| 24 |
-
PATH=/home/
|
| 25 |
-
|
| 26 |
|
| 27 |
# Install Node.js 20 (using n instead of nodesource for better HF compatibility)
|
| 28 |
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
|
|
@@ -43,7 +43,7 @@ WORKDIR $HOME/code
|
|
| 43 |
|
| 44 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 45 |
ADD . $HOME/code
|
| 46 |
-
COPY --chown=
|
| 47 |
|
| 48 |
# INSTALL NPM PACKAGES
|
| 49 |
# INSTALL FFMPEG TOOLING
|
|
|
|
| 13 |
usage="https://huggingface.co/spaces/DeFactOfficial/MMAPI"
|
| 14 |
|
| 15 |
# Set up a new user named "user" with user ID 1000
|
| 16 |
+
RUN useradd -o -u 1000 user
|
| 17 |
|
| 18 |
# Switch to the "user" user
|
| 19 |
+
USER user
|
| 20 |
|
| 21 |
|
| 22 |
# Set home to the user's home directory
|
| 23 |
+
ENV HOME=/home/user \
|
| 24 |
+
PATH=/home/user/.local/bin:$PATH \
|
| 25 |
+
STATIC_SITE_user=$HOME/code/public
|
| 26 |
|
| 27 |
# Install Node.js 20 (using n instead of nodesource for better HF compatibility)
|
| 28 |
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
|
|
|
|
| 43 |
|
| 44 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 45 |
ADD . $HOME/code
|
| 46 |
+
COPY --chown=user . $HOME/code
|
| 47 |
|
| 48 |
# INSTALL NPM PACKAGES
|
| 49 |
# INSTALL FFMPEG TOOLING
|